id
stringlengths
7
11
source
stringclasses
1 value
category
stringclasses
11 values
title
stringlengths
15
214
text
stringlengths
70
30.5k
url
stringlengths
57
160
tags
stringlengths
3
113
created_at
int64
1.22B
1.79B
se_75536819
stackoverflow
FRONTEND_DEVELOPMENT
Auto-add "tw-" prefix to existing codebase
Auto-add "tw-" prefix to existing codebase Tailwind CSS has clear documentation on how one can generate prefixes for all Tailwind classes to better isolate the styles of a particular app from its context. However, I can't seem to find a straight answer on how I can transform the existing code to use the pref...
https://stackoverflow.com/questions/75536819/auto-add-tw-prefix-to-existing-codebase
reactjs, tailwind-css, postcss
1,677,090,670
se_76730337
stackoverflow
FRONTEND_DEVELOPMENT
Is there a way to Tailwind styles from spilling over into other applications? (Isolating tailwind styles to component library)
Is there a way to Tailwind styles from spilling over into other applications? (Isolating tailwind styles to component library) I'm trying to build a React library using Tailwind for styling for the library, one of the issues I'm coming across is that the tailwind styles "spill over" into the applications that implemen...
https://stackoverflow.com/questions/76730337/is-there-a-way-to-tailwind-styles-from-spilling-over-into-other-applications-i
javascript, css, reactjs, tailwind-css
1,689,859,184
se_68912768
stackoverflow
FRONTEND_DEVELOPMENT
Feature Unavailable: facebook login is currently unavailable for this app since we are updating additional details for this app. Please Try again
Feature Unavailable: facebook login is currently unavailable for this app since we are updating additional details for this app. Please Try again I am working in React Native. I am trying to login with a Facebook account, but I get this error from Facebook: Facebook Login is currently unavailable for this app, since w...
https://stackoverflow.com/questions/68912768/feature-unavailable-facebook-login-is-currently-unavailable-for-this-app-since
javascript, reactjs, firebase, react-native, facebook
1,629,831,604
se_71388984
stackoverflow
FRONTEND_DEVELOPMENT
Uncaught TypeError: Cannot read properties of undefined (reading 'includes')?
Uncaught TypeError: Cannot read properties of undefined (reading 'includes')? I am trying to resolve this TypeError but have not been able to. Below is the code it is pointing to. I have tried assigning a var to it as some other similar posts have mentioned but no luck. ): const emailReducer = (state, action) ...
https://stackoverflow.com/questions/71388984/uncaught-typeerror-cannot-read-properties-of-undefined-reading-includes
reactjs, typeerror
1,646,702,348
se_46543132
stackoverflow
FRONTEND_DEVELOPMENT
How to implement dropdown menu in React JS using Material UI?
How to implement dropdown menu in React JS using Material UI? I have a dropdown which has a nested menu as shown below. The dropdown upon expanding shows two options: The problem is upon clicking any of the items the children options under Tenant Name or Dealer ID display for a second and disappear. How to solve...
https://stackoverflow.com/questions/46543132/how-to-implement-dropdown-menu-in-react-js-using-material-ui
javascript, reactjs, drop-down-menu, material-ui
1,507,028,812
se_68891665
stackoverflow
FRONTEND_DEVELOPMENT
MSAL React is not signing out from application instead it is also signing out from other tabs which are authenticated sessions
MSAL React is not signing out from application instead it is also signing out from other tabs which are authenticated sessions I am trying to logout the user in my react application which uses MSAL and with user account abc@mod123.onmicrosoft.com. Now, there is a tab already opened with portal.azure.com for the same u...
https://stackoverflow.com/questions/68891665/msal-react-is-not-signing-out-from-application-instead-it-is-also-signing-out-fr
reactjs, azure, logout, azure-ad-msal, azure-authentication
1,629,717,284
se_72175023
stackoverflow
FRONTEND_DEVELOPMENT
"Error: Cannot find module 'react'" when consuming Parcel's React component library in Next.js project
"Error: Cannot find module 'react'" when consuming Parcel's React component library in Next.js project Context: I try to create a public react component library and use Parcel API to bundle it. The idea is to have a shared React components library to be consumed by other Next.js projects. And whe...
https://stackoverflow.com/questions/72175023/error-cannot-find-module-react-when-consuming-parcels-react-component-libr
reactjs, next.js, parceljs
1,652,112,491
se_74355738
stackoverflow
FRONTEND_DEVELOPMENT
React Native: "Cannot find native module" error
React Native: "Cannot find native module" error In my React Native app, I'm trying to add the expo-mail-composer package using this guide. I use react-native@0.64.0, I added "install-expo-modules": "^0.2.8", then "expo-mail-composer": "~11.3.0", When I try to import the package with import * as MailComposer ...
https://stackoverflow.com/questions/74355738/react-native-cannot-find-native-module-error
reactjs, react-native, expo, react-native-native-module, native-module
1,667,882,329
se_66869928
stackoverflow
FRONTEND_DEVELOPMENT
Add file to LSApplicationQueriesSchemes in your Info.plist WebView React Native
Add file to LSApplicationQueriesSchemes in your Info.plist WebView React Native I'm implementing a payment platform in the app that I'm building so the payment form is shown on a WebView Now the form loads okay, but when I change something like I select a payment method from the drop-down web page loads to show option...
https://stackoverflow.com/questions/66869928/add-file-to-lsapplicationqueriesschemes-in-your-info-plist-webview-react-native
ios, reactjs, react-native, info-plist
1,617,102,787
se_67896084
stackoverflow
FRONTEND_DEVELOPMENT
Generate an access token in the browser that is scoped to Kusto Azure Data Explorer
Generate an access token in the browser that is scoped to Kusto Azure Data Explorer From the command line I can generate an access token using: az account get-access-token However this access token won't work with kusto because the token has not been scoped. az account get-access-token --resource https://{name}.{locat...
https://stackoverflow.com/questions/67896084/generate-an-access-token-in-the-browser-that-is-scoped-to-kusto-azure-data-explo
reactjs, azure, active-directory, azure-ad-msal, msal.js
1,623,199,139
se_56750008
stackoverflow
FRONTEND_DEVELOPMENT
Exit status 255 when trying to do npm start
Exit status 255 when trying to do npm start When I try to run npm start I am facing this issue again and again with status code 255. Things I have tried till now: Uninstalled,removed node modules and package.json file and reinstalled still same issue. Changed the package.json file Removed webpack-dev-server and rein...
https://stackoverflow.com/questions/56750008/exit-status-255-when-trying-to-do-npm-start
reactjs, npm-start
1,561,452,045
se_52107707
stackoverflow
FRONTEND_DEVELOPMENT
React Table Column Header Data
React Table Column Header Data I am trying to create a Jeopardy app using React and React Table and I am stuck. I am trying to get the column headers to get filled in with the actual name of the category from the jeopardy API. The object fetched from the API looks like this: "id": 11111, "title": "papers", "clues_coun...
https://stackoverflow.com/questions/52107707/react-table-column-header-data
javascript, reactjs, react-table
1,535,682,781
se_44553799
stackoverflow
FRONTEND_DEVELOPMENT
React Scripts fails to compile
React Scripts fails to compile I've found a bunch of somewhat related answers but can't seem to fix so far... Bit new to React (and I'm tirrred) so have no clue - I've created a new React app with create-react-app, then added the Github Pages bits in package.json per here. On npm run build it's failing to compile. E...
https://stackoverflow.com/questions/44553799/react-scripts-fails-to-compile
node.js, reactjs, npm, github-pages
1,497,470,710
se_67746574
stackoverflow
FRONTEND_DEVELOPMENT
Jest TypeError: Cannot read property of null
Jest TypeError: Cannot read property of null I have a setup for an external application and start it within a const, then put it in the const allowAppInstance the configuration of the appConfig export const setupRemote = () => { if (isRemoteAvailable) { try { ... const allowAppInstance = SetupConfig...
https://stackoverflow.com/questions/67746574/jest-typeerror-cannot-read-property-of-null
javascript, reactjs, jestjs, react-testing-library, testing-library
1,622,245,878
se_62859885
stackoverflow
FRONTEND_DEVELOPMENT
React - How to append an object as a field to FormData
React - How to append an object as a field to FormData I am using React, and am trying to send data back to my backend (DRF) using FormData to properly store the data. However, I am facing some issues with appending objects as fields into FormData, as it would be converted to [object, Object]. Is there any way to over...
https://stackoverflow.com/questions/62859885/react-how-to-append-an-object-as-a-field-to-formdata
javascript, reactjs
1,594,549,385
se_78119872
stackoverflow
FRONTEND_DEVELOPMENT
shadcn/radix/react: NavigationMenuTrigger with asChild not possible - React.Children.only expected to receive a single React element child
shadcn/radix/react: NavigationMenuTrigger with asChild not possible - React.Children.only expected to receive a single React element child I use the newest version of shadcn for developing. Now I want to use the Button as the menu trigger. <NavigationMenuTrigger asChild> <Button variant="outline"> <CircleUserRou...
https://stackoverflow.com/questions/78119872/shadcn-radix-react-navigationmenutrigger-with-aschild-not-possible-react-chil
css, reactjs, typescript, radix-ui, shadcnui
1,709,800,841
se_73213153
stackoverflow
FRONTEND_DEVELOPMENT
ASP.NET Core 6 React app with Individual accounts using SQLite 401 Unauthorized error
ASP.NET Core 6 React app with Individual accounts using SQLite 401 Unauthorized error I've created a DEFAULT ASP.NET Core 6 React app with Individual Accounts enabled and SQLite as the default database: dotnet new react -au Individual -o core-react-sqlite But then when I run the app, register a new user, confirm the ...
https://stackoverflow.com/questions/73213153/asp-net-core-6-react-app-with-individual-accounts-using-sqlite-401-unauthorized
reactjs, asp.net-core, identityserver4, duende-identity-server
1,659,470,532
se_79985538
stackoverflow
FRONTEND_DEVELOPMENT
Getting this error: Uncaught Error: Objects are not valid as a React child (found: object with keys
Getting this error: Uncaught Error: Objects are not valid as a React child (found: object with keys I'm trying to make a simple cart and I keep getting the error above in addToCart function. My obj looks like this: export const menu = [ { id: 1, name: "Opção 1", opts: [ { id: 1, name: "opção-1", ti...
https://stackoverflow.com/questions/79985538/getting-this-error-uncaught-error-objects-are-not-valid-as-a-react-child-foun
javascript, reactjs, jsx
1,784,894,422
se_79985585
stackoverflow
FRONTEND_DEVELOPMENT
Vite React project creation fails with &quot;Cannot find native binding&quot; and ERR_DLOPEN_FAILED on Windows (Node.js 22)
Vite React project creation fails with &quot;Cannot find native binding&quot; and ERR_DLOPEN_FAILED on Windows (Node.js 22) I'm trying to create a new React project using Vite on Windows. Command I ran: npm create vite@latest I selected: - Framework: React - Variant: JavaScript After the project is created and depende...
https://stackoverflow.com/questions/79985585/vite-react-project-creation-fails-with-cannot-find-native-binding-and-err-dlop
reactjs, windows, npm, vite
1,784,903,634
se_74256987
stackoverflow
FRONTEND_DEVELOPMENT
Radio buttons break with React JSX - Expressions must have one parent element
Radio buttons break with React JSX - Expressions must have one parent element import React, { useEffect, useState } from 'react'; import { EmployeeList } from '../EmployeeList/EmployeeList'; export default function EmployeeMenu(props) { const [employeeList, setEmployeeList] = useState(() => new EmployeeList(...
https://stackoverflow.com/questions/74256987/radio-buttons-break-with-react-jsx-expressions-must-have-one-parent-element
reactjs, forms, components, mapping, jsx
1,667,166,200
se_78006058
stackoverflow
FRONTEND_DEVELOPMENT
_dirname is not defined in ES module scope
_dirname is not defined in ES module scope I encountered a problem where I received a reference error stating "_dirname is not defined in ES module scope". This occurred after I made a change in the package.json file by setting the type to "module". Could someone please offer a solution? import { fileURLToPath } from ...
https://stackoverflow.com/questions/78006058/dirname-is-not-defined-in-es-module-scope
reactjs, node.js, npm
1,708,072,961
se_27784212
stackoverflow
FRONTEND_DEVELOPMENT
How to use radio buttons in ReactJS?
How to use radio buttons in ReactJS? I am new to ReactJS, sorry if this sounds off. I have a component that creates several table rows according to the received data. Each cell within the column has a radio checkbox. Hence the user can select one site_name and one address from the existing rows. The selection shall b...
https://stackoverflow.com/questions/27784212/how-to-use-radio-buttons-in-reactjs
html, reactjs
1,420,476,929
se_63382309
stackoverflow
FRONTEND_DEVELOPMENT
How can I trigger opening a select form&#39;s options on click of another button in react? I have tried using a ref but its not working
How can I trigger opening a select form&#39;s options on click of another button in react? I have tried using a ref but its not working Here is my select form: <form ref={skuSelectRef}> <label htmlFor="size" /> <select id="size" value={selectedSKU} onChange={() => changeSKU(size.options...
https://stackoverflow.com/questions/63382309/how-can-i-trigger-opening-a-select-forms-options-on-click-of-another-button-in
javascript, reactjs, react-ref, react-forms
1,597,255,273
se_79984157
stackoverflow
FRONTEND_DEVELOPMENT
How do you run a dummy useReducer dispatch function in Jest?
How do you run a dummy useReducer dispatch function in Jest? I'm currently trying to write unit tests for one of my components, but unfortunately it seems like the dummy dispatch function to take the place of the reducer's one is not firing at all. Up until the final line, everything is working fine, but when the dis...
https://stackoverflow.com/questions/79984157/how-do-you-run-a-dummy-usereducer-dispatch-function-in-jest
reactjs, jestjs
1,784,803,436
se_71443749
stackoverflow
FRONTEND_DEVELOPMENT
react-table with filter and select column in the same table
react-table with filter and select column in the same table I'm trying to use react-table 7.5 to have a table with search bar and select by rows features. I have the code of both search and select row separately, but I can't make it work together. This is my Table component: const Table = (...) => { const [data, se...
https://stackoverflow.com/questions/71443749/react-table-with-filter-and-select-column-in-the-same-table
javascript, reactjs, electron, react-table, react-tabs
1,647,026,934
se_68250951
stackoverflow
FRONTEND_DEVELOPMENT
React material ui select all checkbox
React material ui select all checkbox I need to make that when selecting checkbox Select All, the rest of the checkboxes from the list are checked, and each checkbox can be selected separately. But when select one of the checkboxes does not checked the previous checkbox. sandbox const options = [ 'Selected Item 1', '...
https://stackoverflow.com/questions/68250951/react-material-ui-select-all-checkbox
javascript, reactjs
1,625,461,783
se_70382213
stackoverflow
FRONTEND_DEVELOPMENT
Errors object is not being updated properly on input
Errors object is not being updated properly on input coming into a new codebase here and it's also my first time using Formik and Yup so I will try to be as concise as possible, but bear with me. I have some forms that were built with Formik and use a validation schema provided by Yup. I also have a useState variable ...
https://stackoverflow.com/questions/70382213/errors-object-is-not-being-updated-properly-on-input
reactjs, typescript, formik, yup
1,639,670,979
se_79983966
stackoverflow
FRONTEND_DEVELOPMENT
Does Vite 8.1 build.chunkImportMap stop an old tab from loading removed lazy chunks?
Does Vite 8.1 build.chunkImportMap stop an old tab from loading removed lazy chunks? I am testing the new build.chunkImportMap option in Vite 8.1 with a React app that uses React.lazy(). My basic setup import { lazy, Suspense, useState } from 'react' const LazyPage = lazy(() => import('./LazyPage.jsx')) export defau...
https://stackoverflow.com/questions/79983966/does-vite-8-1-build-chunkimportmap-stop-an-old-tab-from-loading-removed-lazy-chu
reactjs, vite, browser-cache
1,784,749,422
se_58161615
stackoverflow
FRONTEND_DEVELOPMENT
How to make chat like UI with chat bubbles in React JS
How to make chat like UI with chat bubbles in React JS I have some JSON data in dummyData. I am not sure how can I place the chat bubbles on left and right according to the direction. I am using Material UI and context API. Image for the reference. I don't want to use any library other than material UI. Currently, ...
https://stackoverflow.com/questions/58161615/how-to-make-chat-like-ui-with-chat-bubbles-in-react-js
javascript, css, reactjs, material-ui, jsx
1,569,818,828
se_77276369
stackoverflow
FRONTEND_DEVELOPMENT
How to access form data in a post request when using React (TypeScript)?
How to access form data in a post request when using React (TypeScript)? I wanted to create a simple signup page using React in TypeScript. My goal was to create two input fields on a signup page asking for a first and last name, and once the form was submitted, it would redirect the user to a page called "complete" t...
https://stackoverflow.com/questions/77276369/how-to-access-form-data-in-a-post-request-when-using-react-typescript
reactjs, forms, post, react-tsx
1,697,057,980
se_78125265
stackoverflow
FRONTEND_DEVELOPMENT
React to Laravel CSRF token mismatch
React to Laravel CSRF token mismatch So I've tried a lot of solution online but none had work, I always get 419 error when sending a post request from react to laravel. cors.php 'paths' => ['*'], 'allowed_methods' => ['*'], 'allowed_origins' => [env('FRONTEND_URL', 'http://localhost:3000')], 'allowe...
https://stackoverflow.com/questions/78125265/react-to-laravel-csrf-token-mismatch
reactjs, laravel, axios, csrf-token
1,709,864,758
se_78741384
stackoverflow
FRONTEND_DEVELOPMENT
CORS Error on https://api.anthropic.com/v1/messages API with Reacrt.js
CORS Error on https://api.anthropic.com/v1/messages API with Reacrt.js I am facing CORS issue while integrating 'https://api.anthropic.com/v1/messages', Does anyone solved it? try { const response = await axios.post( 'https://api.anthropic.com/v1/messages', { model: "claude-3-5-sonnet-2...
https://stackoverflow.com/questions/78741384/cors-error-on-https-api-anthropic-com-v1-messages-api-with-reacrt-js
reactjs, cors, claude
1,720,801,342
se_75464970
stackoverflow
FRONTEND_DEVELOPMENT
React HashRouter doesn&#39;t render anything on GitHub Pages
React HashRouter doesn&#39;t render anything on GitHub Pages HashRouter doesn't render anything on GitHub pages and the console doesn't show any errors either. Also it renders locally only if I put a # before the app name so instead of typing: localhost:3000/chat-app I have to type localhost:3000/#/chat-app. App.js im...
https://stackoverflow.com/questions/75464970/react-hashrouter-doesnt-render-anything-on-github-pages
javascript, reactjs, github, react-router-dom, github-pages
1,676,491,697
se_48452577
stackoverflow
FRONTEND_DEVELOPMENT
How can I review OSS license status of node_modules in my app?
How can I review OSS license status of node_modules in my app? My companies web UI app is React/Redux/Node based. node_modules has some 900 directories in it. Before we release the app, Legal wants a review of the license status of all Open Source Software included, both server and UI. What is an easy way to review ...
https://stackoverflow.com/questions/48452577/how-can-i-review-oss-license-status-of-node-modules-in-my-app
node.js, reactjs, open-source
1,516,917,587
se_72484320
stackoverflow
FRONTEND_DEVELOPMENT
How do you use react-hook-form with redux and typescript properly
How do you use react-hook-form with redux and typescript properly After many days of trying to find a guide that would show me all of these things in one example I finally gave up and made something that works via brute force, but I know that this is the wrong way to do it. I don't know exactly why it's wrong but it ...
https://stackoverflow.com/questions/72484320/how-do-you-use-react-hook-form-with-redux-and-typescript-properly
reactjs, typescript, redux, react-hook-form
1,654,225,781
se_67141439
stackoverflow
FRONTEND_DEVELOPMENT
How to test Reac Lazy inside an object
How to test Reac Lazy inside an object At the project I'm working on, there's a few named exports like the object below: export const object = { component: React.lazy(() => import('some-component')) } (They have more properties but I'll just show this one for brevity) The issue When I try to test it using Jest, I...
https://stackoverflow.com/questions/67141439/how-to-test-reac-lazy-inside-an-object
javascript, reactjs, testing, jestjs
1,618,682,902
se_79982351
stackoverflow
FRONTEND_DEVELOPMENT
Unable to understand how transitions work in React? (with a code example)
Unable to understand how transitions work in React? (with a code example) I am trying to understand how transitions work in React. Everytime I read the docs, I get a reasonable understanding but when I experiment with it, the understanding breaks down. I am unable to consistently predict its behaviour. Can someone ple...
https://stackoverflow.com/questions/79982351/unable-to-understand-how-transitions-work-in-react-with-a-code-example
reactjs
1,784,579,606
se_69827526
stackoverflow
FRONTEND_DEVELOPMENT
npm run Lifecycle scripts included in project: test echo &quot;Error: no test specified&quot; &amp;&amp; exit 1
npm run Lifecycle scripts included in project: test echo &quot;Error: no test specified&quot; &amp;&amp; exit 1 I am trying to develop a springboot/react app and have installed react and created the react project. However when I try to execute: npm run I get the following error: Lifecycle scripts included in project:...
https://stackoverflow.com/questions/69827526/npm-run-lifecycle-scripts-included-in-project-test-echo-error-no-test-specifi
node.js, reactjs, spring, spring-boot, react-native
1,635,953,310
se_79982186
stackoverflow
FRONTEND_DEVELOPMENT
How to create a custom component ColumnGroup
How to create a custom component ColumnGroup I want the names of individual groups to be a link I'm trying to create a custom component ColumnGroup (Rsuite 6.2.2) like this: const CustomColumnGroup = (props) => { const { Column, ColumnGroup, HeaderCell, Cell } = Table; return ( <ColumnGroup {...props} header="...
https://stackoverflow.com/questions/79982186/how-to-create-a-custom-component-columngroup
reactjs, rsuite
1,784,541,210
se_48520663
stackoverflow
FRONTEND_DEVELOPMENT
Server side redirect with ReactJs
Server side redirect with ReactJs I am trying to issue a server side redirect for certain pages for SEO reasons. The problem I am trying to solve is that some of my pages will get index by google, so if they are deleted or taken offline we want to redirect them to a different page rather than showing 404. What is the ...
https://stackoverflow.com/questions/48520663/server-side-redirect-with-reactjs
reactjs, express, http-redirect, react-router, server-side
1,517,312,694
se_38796756
stackoverflow
FRONTEND_DEVELOPMENT
React Components - What is the proper way to create them?
React Components - What is the proper way to create them? I'm learning React and I came across two different ways to create components. One is by Facebook and the other by AirBnB. I also saw them in the tutorials I've been watching. This may be a stupid question, but which one is better? Facebook: var React = requi...
https://stackoverflow.com/questions/38796756/react-components-what-is-the-proper-way-to-create-them
javascript, reactjs, components, frontend, jsx
1,470,426,286
se_59727305
stackoverflow
FRONTEND_DEVELOPMENT
Is it possible to apply react-konva into React Native project?
Is it possible to apply react-konva into React Native project? I saw react-konva bounce ball sample https://codesandbox.io/s/5qvyyyjrx from google and I tried to apply it into my React Native app. But no luck, I getting this error invariant violation view config not found for name div which is from Stage (import { St...
https://stackoverflow.com/questions/59727305/is-it-possible-to-apply-react-konva-into-react-native-project
reactjs, react-native, canvas, react-konva
1,578,973,912
se_66380039
stackoverflow
FRONTEND_DEVELOPMENT
How to change fill color for React icons?
How to change fill color for React icons? I want to change the color of React-icons. Say, for example {AiFillHeart} icon. I want to change its fill color to red. How can I do this? I have tried <AiFillHeart style = {{color: 'red'}}/>. But it does not works.
https://stackoverflow.com/questions/66380039/how-to-change-fill-color-for-react-icons
css, reactjs, svg, icons, react-icons
1,614,312,923
se_49119014
stackoverflow
FRONTEND_DEVELOPMENT
React Select with very large options lists
React Select with very large options lists I have a select component that will need to handle around 7,000 options in it. I am running into two problems. 1) when typing into the search parameter things are loading too slowly. 2) I need to filter though all of the options and disable options that have previously been...
https://stackoverflow.com/questions/49119014/react-select-with-very-large-options-lists
javascript, reactjs, large-data, react-select
1,520,282,143
se_71624746
stackoverflow
FRONTEND_DEVELOPMENT
Getting &#39;fetch has been blocked by CORS policy: No &#39;Access-Control-Allow-Origin&#39; header is present... on React page
Getting &#39;fetch has been blocked by CORS policy: No &#39;Access-Control-Allow-Origin&#39; header is present... on React page while I am experienced in .NET and JavaScript, I am currently learning React and during the fetch to my REST API I am getting this error. Access to fetch at 'https://localhost:7142/api/Campa...
https://stackoverflow.com/questions/71624746/getting-fetch-has-been-blocked-by-cors-policy-no-access-control-allow-origin
reactjs, json, .net, rest, fetch-api
1,648,259,674
se_65769326
stackoverflow
FRONTEND_DEVELOPMENT
How to get DeviceInfo and DeviceId in React js web application Not React-Native Application
How to get DeviceInfo and DeviceId in React js web application Not React-Native Application I have Installed React-native-device-info API in my React js project. But when running npm start command in command prompt it was throwing error like " Module not found: Can't resolve 'react-native' in '\node_modules\react-nati...
https://stackoverflow.com/questions/65769326/how-to-get-deviceinfo-and-deviceid-in-react-js-web-application-not-react-native
reactjs, react-native-device-info
1,610,948,274
se_57967757
stackoverflow
FRONTEND_DEVELOPMENT
How can I pass multiple value by select in reactjs
How can I pass multiple value by select in reactjs I need to pass multiple value by using onChange when I select the option, but I can not select single option . it select whole objects . Here is my code . const test = [{id:1, name:'test, value:{x:10}}] <Select showSearch style={{ width: 200 }} placeh...
https://stackoverflow.com/questions/57967757/how-can-i-pass-multiple-value-by-select-in-reactjs
javascript, arrays, node.js, reactjs, object
1,568,697,585
se_67510496
stackoverflow
FRONTEND_DEVELOPMENT
Testing zustand state changes caused by a component in Jest
Testing zustand state changes caused by a component in Jest I am pretty new to using jest and Im trying to test a component that makes a state change which acts upon my global state (using Zustand). Basically im clicking a button and its adding an item to my state.traits. Here is my component code: import { Flex, useT...
https://stackoverflow.com/questions/67510496/testing-zustand-state-changes-caused-by-a-component-in-jest
reactjs, unit-testing, jestjs, zustand
1,620,850,790
se_57861796
stackoverflow
FRONTEND_DEVELOPMENT
How to set data from a react hook inside of a function or event?
How to set data from a react hook inside of a function or event? I'm trying to learn to create hooks so I can re-use data that I have to change in different components. I'm using Material UI's Tabs and need to use useTab, a custom hook to change the tab id. import React, { useContext } from 'react'; import { Product...
https://stackoverflow.com/questions/57861796/how-to-set-data-from-a-react-hook-inside-of-a-function-or-event
javascript, reactjs, next.js
1,568,067,222
se_75883720
stackoverflow
FRONTEND_DEVELOPMENT
504 (Outdated Optimize Dep) while using react-vite
504 (Outdated Optimize Dep) while using react-vite I installed a package called big decimal js while using React with JavaScript on Vite. On compiling, it showed the following error on the console, and the application did not load: My package.json: { "name": "settleup", "private": true, "version": "0.0.0", "t...
https://stackoverflow.com/questions/75883720/504-outdated-optimize-dep-while-using-react-vite
javascript, reactjs, vite, bigdecimal
1,680,144,511
se_59840919
stackoverflow
FRONTEND_DEVELOPMENT
Warning: A future version of React will block javascript: URLs
Warning: A future version of React will block javascript: URLs I cloned repo from gitlab and installed the dependencies then When I type yarn next dev from command line I get index.js:1 Warning: A future version of React will block javascript: URLs as a security precaution. Use event handlers instead if you can. If ...
https://stackoverflow.com/questions/59840919/warning-a-future-version-of-react-will-block-javascript-urls
reactjs, redux, next.js
1,579,608,802
se_50880724
stackoverflow
FRONTEND_DEVELOPMENT
Full centering component
Full centering component I would like to know if there is a component that allows me to center vertical/horizontal anything I want without writing custom CSS? I have tried react-center and react-flexbox-grid but without any success. It would be nice if there is some component that allows me to set how I want to align...
https://stackoverflow.com/questions/50880724/full-centering-component
reactjs, react-flexbox-grid
1,529,086,141
se_66929570
stackoverflow
FRONTEND_DEVELOPMENT
How to differentiate on click handler?
How to differentiate on click handler? I have a navigation class component in which I want to use modal after clicking in 'about' or 'contact'. I use event handler which changes state and then open modal, but I don't know how to differentiate the click between 'about' and 'contact' to open different modal. Any help? c...
https://stackoverflow.com/questions/66929570/how-to-differentiate-on-click-handler
javascript, reactjs
1,617,442,289
se_72573101
stackoverflow
FRONTEND_DEVELOPMENT
append on useFieldArray
append on useFieldArray I would like to create an array of inputs with at least 1 input by default. while submitting the form inputs should not be empty. returned data should be an array with the all the values of inputs i've created this, and it works great but for some reason, append will not let me add/append new i...
https://stackoverflow.com/questions/72573101/append-on-usefieldarray
reactjs, react-hook-form
1,654,858,292
se_79981675
stackoverflow
FRONTEND_DEVELOPMENT
React using a custom fetch hook, should you put data into state
React using a custom fetch hook, should you put data into state When using something like a simple custom fetch hook: import { useEffect, useState } from "react"; import useAxiosPrivate from "./useAxiosPrivate"; function useFetch(url) { const [data, setData] = useState(null); const [loading, setLoading] = useSt...
https://stackoverflow.com/questions/79981675/react-using-a-custom-fetch-hook-should-you-put-data-into-state
best-practices, javascript, reactjs, react-hooks, react-state
1,784,309,656
se_71417343
stackoverflow
FRONTEND_DEVELOPMENT
How do you put padding/margin around the content of the drawer in antd?
How do you put padding/margin around the content of the drawer in antd? It is showing up like this for me. How do I make the content have padding, without having to write custom CSS and use the className property? My drawer essentially looks like this: <Drawer closable visible width={400} placement="right" ...
https://stackoverflow.com/questions/71417343/how-do-you-put-padding-margin-around-the-content-of-the-drawer-in-antd
css, reactjs, antd
1,646,870,072
se_67729934
stackoverflow
FRONTEND_DEVELOPMENT
Callback function don&#39;t set state so component try to re-render with empty values and throw error
Callback function don&#39;t set state so component try to re-render with empty values and throw error I have a react component that fetching data from an api. Then depending on its state parameters i rendering one of two pages - with teams or with championships. First it renders a list of a championships . And it work...
https://stackoverflow.com/questions/67729934/callback-function-dont-set-state-so-component-try-to-re-render-with-empty-value
javascript, reactjs, react-hooks
1,622,149,323
se_74001985
stackoverflow
FRONTEND_DEVELOPMENT
React + Vite page is not showing anything
React + Vite page is not showing anything I am pretty new to web dev and I am currently trying to build something with React + Vite. But when I run npm run dev the page shows me a completely white screen like this: And there is no error in the terminal: I have no idea where to look But this is my App.jsx: This is my...
https://stackoverflow.com/questions/74001985/react-vite-page-is-not-showing-anything
reactjs, tailwind-css, vite
1,665,286,693
se_40794468
stackoverflow
FRONTEND_DEVELOPMENT
Upload a image with fetch
Upload a image with fetch I have a form defined: <form method="POST" onSubmit={this.handleSubmit.bind(this)} enctype="multipart/form-data"> The handler for the submit event is defined as such: handleSubmit(event) { event.preventDefault(); var FormData = require('form-data'); var form = ...
https://stackoverflow.com/questions/40794468/upload-a-image-with-fetch
reactjs, file-upload, laravel-5, redux, fetch
1,480,021,497
se_78496480
stackoverflow
FRONTEND_DEVELOPMENT
The proper way to use marked.js with the Vue/React components
The proper way to use marked.js with the Vue/React components I write publications in markdown and use marked.js to display them on my blog. The blog uses custom image gallery components, audio and video players, etc. There are several simple marked.js extensions for that. The issue is marked.js is mastering transform...
https://stackoverflow.com/questions/78496480/the-proper-way-to-use-marked-js-with-the-vue-react-components
advice, reactjs, vue.js, markdown, javascript-marked
1,715,958,231
se_71100587
stackoverflow
FRONTEND_DEVELOPMENT
Can i import the SVG file as a react component with dynamic import() Expressions?
Can i import the SVG file as a react component with dynamic import() Expressions? From this answer from stackoverflow, I got a solution on how to import svg as ReactComponent and change their color/width, etc. But is it possible to do the same for dynamic import? My functional component: import * as React from 'react'...
https://stackoverflow.com/questions/71100587/can-i-import-the-svg-file-as-a-react-component-with-dynamic-import-expressions
javascript, reactjs, typescript, react-typescript
1,644,755,144
se_49979637
stackoverflow
FRONTEND_DEVELOPMENT
How to use ant design in server side rendering?
How to use ant design in server side rendering? I want to use ant design in server side rendering react application project. How to import antd in server side rendering ? import { Icon, Form, Input, Button, Upload, Select, Badge, Avatar, Divider, Checkbox, DatePicker, Row, Col, Carousel } from 'antd';
https://stackoverflow.com/questions/49979637/how-to-use-ant-design-in-server-side-rendering
reactjs, antd
1,524,481,703
se_73728342
stackoverflow
FRONTEND_DEVELOPMENT
How to set cookies in localhost - ReactJS
How to set cookies in localhost - ReactJS I know there are already a lot of questions similar to this but I couldn't find a solution yet. I managed to deploy my React app on a server, and cookies work fine. Cookie is set by the server with set-cookie and then automatically included in all subsequent requests However, ...
https://stackoverflow.com/questions/73728342/how-to-set-cookies-in-localhost-reactjs
reactjs, cookies, react-redux, localhost
1,663,232,469
se_66258858
stackoverflow
FRONTEND_DEVELOPMENT
Enable a Storybook control conditionally
Enable a Storybook control conditionally I use controls in a story to see different states of a component. Some props only make sense if some other prop is enabled. For example, I have 3 props: isEmployee - boolean isActive - boolean canContactInTheWeekend - boolean Here, canContactInTheWeekend applies only if isAct...
https://stackoverflow.com/questions/66258858/enable-a-storybook-control-conditionally
javascript, reactjs, components, storybook
1,613,646,983
se_73647725
stackoverflow
FRONTEND_DEVELOPMENT
How to add autoprefixer with vite + react project
How to add autoprefixer with vite + react project Hi I created the react app using npm create vite and I tried to integrate autoprefixer but it's not working. vite.config.js import { defineConfig } from 'vite'; import react from '@vitejs/plugin-react'; import autoprefixer from 'autoprefixer'; export default defineCon...
https://stackoverflow.com/questions/73647725/how-to-add-autoprefixer-with-vite-react-project
reactjs, vite, postcss, autoprefixer
1,662,633,545
se_69971040
stackoverflow
FRONTEND_DEVELOPMENT
How can I access browser history with Next.js?
How can I access browser history with Next.js? I need user history for some redirection. How can I access it? If I couldn't there are the best practices to store the user history in my app.
https://stackoverflow.com/questions/69971040/how-can-i-access-browser-history-with-next-js
reactjs, next.js
1,636,963,107
se_78973832
stackoverflow
FRONTEND_DEVELOPMENT
Is it possible to display a base64 docx file in React?
Is it possible to display a base64 docx file in React? I'm receiving documents from an API as a base64 string, and would like to display this in the browser. Is anyone aware of a way to display this base64 docx file? I've tried various packages to do this but they seem to only work if provided with a URL to a file tha...
https://stackoverflow.com/questions/78973832/is-it-possible-to-display-a-base64-docx-file-in-react
tooling-recommendation, javascript, reactjs, base64
1,726,058,304
se_76485672
stackoverflow
FRONTEND_DEVELOPMENT
Problems setting up react-i18next with NextJs 13 for component localization
Problems setting up react-i18next with NextJs 13 for component localization I'm digging into NextJS 13 and I need to understand a simple use case for i18next: My goal is only to translate components, both server and client side, as simple as: import { withTranslation } from 'react-i18next'; const MyComponent = () =>...
https://stackoverflow.com/questions/76485672/problems-setting-up-react-i18next-with-nextjs-13-for-component-localization
reactjs, next.js, i18next, next.js13, react-i18next
1,686,864,924
se_77068896
stackoverflow
FRONTEND_DEVELOPMENT
Next.js App router i18n &#39;/&#39; for default language
Next.js App router i18n &#39;/&#39; for default language I am migrating from Next.js /pages to /app and I have 2 languages en and es, the default language is en and the url structure is: English example.com/ example.com/blog/my-post Spanish example.com/es example.com/es/blog/mi-articulo But when integrating i18n o...
https://stackoverflow.com/questions/77068896/next-js-app-router-i18n-for-default-language
reactjs, next.js, internationalization, i18next
1,694,194,536
se_62242963
stackoverflow
FRONTEND_DEVELOPMENT
Get current language next-i18next
Get current language next-i18next I am using NextJS with next-i18next. This is my home page: import {withTranslation} from '../config/next-i18next'; const Home = function Home() { return (<div>test</div>) }; Home.getInitialProps = async () => { return {namespacesRequired: ['home']} }; export default withTrans...
https://stackoverflow.com/questions/62242963/get-current-language-next-i18next
node.js, reactjs, internationalization, next.js, i18next
1,591,519,575
se_77583341
stackoverflow
FRONTEND_DEVELOPMENT
Cannot find module @rollup/rollup-win32-x64-msvc. npm has a bug related to optional dependencies
Cannot find module @rollup/rollup-win32-x64-msvc. npm has a bug related to optional dependencies I am facing an error while running the server after creating a vite application please help me resolve this. I was learning threejs and just created a vite application with vanilla framework and javascript as the language...
https://stackoverflow.com/questions/77583341/cannot-find-module-rollup-rollup-win32-x64-msvc-npm-has-a-bug-related-to-optio
javascript, reactjs, vite, rollupjs
1,701,411,813
se_56223473
stackoverflow
FRONTEND_DEVELOPMENT
Use react-redux useSelector with typescript
Use react-redux useSelector with typescript When trying to use the new useSelector hook (see below example) of react-redux typescript gives an error that the function does not exist: Module '"../../../node_modules/@types/react-redux"' has no exported member 'useSelector'. TS2305 Example: import * as React from "r...
https://stackoverflow.com/questions/56223473/use-react-redux-useselector-with-typescript
reactjs, typescript, redux, react-redux, react-hooks
1,558,364,077
se_75977890
stackoverflow
FRONTEND_DEVELOPMENT
expo doctor not supported, expo-cli doctor not fixing dependencies
expo doctor not supported, expo-cli doctor not fixing dependencies I am unable to run npx expo doctor $ npx expo doctor $ expo doctor is not supported in the local CLI, please use expo-cli doctor instead Tried out expo-cli doctor --fix-dependencies but it does not appear to have changed my packages.json. $ expo-cl...
https://stackoverflow.com/questions/75977890/expo-doctor-not-supported-expo-cli-doctor-not-fixing-dependencies
reactjs, react-native, npm, expo
1,681,136,238
se_41567322
stackoverflow
FRONTEND_DEVELOPMENT
React JS bold the text in between
React JS bold the text in between In the below code, I would like to style only some words for chartDesc (for example "the payback period"). Either bold or italic etc. Tried regular expressions, did not work. Please help! import React from 'react'; import Pie from './Pie'; import TextTruncate from 'react-text-truncat...
https://stackoverflow.com/questions/41567322/react-js-bold-the-text-in-between
reactjs, text, styles
1,484,046,371
se_78321710
stackoverflow
FRONTEND_DEVELOPMENT
Shadcn/ui Select - change state when user selects item
Shadcn/ui Select - change state when user selects item I am using shadnui and trying to do something very simple > make the user choose from a list of 1 to 6. I want to update the state when the user selects a number. I found this thread Shadcn ui select component state not updating after change So i tried this: "use ...
https://stackoverflow.com/questions/78321710/shadcn-ui-select-change-state-when-user-selects-item
reactjs, next.js, select, drop-down-menu, shadcnui
1,713,034,743
se_79980745
stackoverflow
FRONTEND_DEVELOPMENT
Why does useEffect show an old external store value after React Activity is shown again?
Why does useEffect show an old external store value after React Activity is shown again? I was testing Activity in react 19.2 and noticed that a component using useEffect keeps the old store value after the activity is hidden and then shown again. The same example works correctly with useSyncExternalStore. import { A...
https://stackoverflow.com/questions/79980745/why-does-useeffect-show-an-old-external-store-value-after-react-activity-is-show
javascript, reactjs, react-hooks, react-state-management
1,784,049,717
se_41019127
stackoverflow
FRONTEND_DEVELOPMENT
offsetTop,offsetLeft and getBoundingClientRect() are not working in my React app
offsetTop,offsetLeft and getBoundingClientRect() are not working in my React app I'm working in react and I'm creating a button with a tooltip, but I can't place it. I mean I can't read the button's distance from the top and left. I tried offsetTop and offsetLeft and I got this error: "Uncaught TypeError: Cannot read ...
https://stackoverflow.com/questions/41019127/offsettop-offsetleft-and-getboundingclientrect-are-not-working-in-my-react-app
javascript, reactjs
1,481,118,388
se_65198486
stackoverflow
FRONTEND_DEVELOPMENT
Understanding Typescript Record type with React&#39;s useContext
Understanding Typescript Record type with React&#39;s useContext I'm having some issues understanding the record type in a generator function I'm developing for React contexts. Here's my generator function: import * as React from 'react' export type State = Record<string, unknown> export type Action = { type: string;...
https://stackoverflow.com/questions/65198486/understanding-typescript-record-type-with-reacts-usecontext
javascript, reactjs, typescript, react-context
1,607,428,697
se_73925705
stackoverflow
FRONTEND_DEVELOPMENT
how to trim dot at the end of string in JS?
how to trim dot at the end of string in JS? How can I trim the dot at the end of string in JS ? Input: const string = 'ABCD.txt' Output: const string = 'ABCD' How can I do ? Thanks for help me 🥰
https://stackoverflow.com/questions/73925705/how-to-trim-dot-at-the-end-of-string-in-js
javascript, reactjs, string
1,664,712,669
se_48899435
stackoverflow
FRONTEND_DEVELOPMENT
use pagination with react-bootstrap table
use pagination with react-bootstrap table I am building a basic react app using create-react-app and react-bootstrap. I am using a table to show information using from react-bootstrap https://react-bootstrap.github.io/components/table/. I am trying to get pagination working for the table and I am not sure how to get ...
https://stackoverflow.com/questions/48899435/use-pagination-with-react-bootstrap-table
reactjs, react-bootstrap, create-react-app
1,519,194,503
se_79980164
stackoverflow
FRONTEND_DEVELOPMENT
How to make Vite add react-icons to a separate .js file when executing &#39;npm run dev&#39;?
How to make Vite add react-icons to a separate .js file when executing &#39;npm run dev&#39;? I have to show icons (100+) in my React app so the used can select one which will be used on some diagram. I was able to achieve that so my import looks like ... import * as IconsFa from 'react-icons/fa' import * as IconsIo f...
https://stackoverflow.com/questions/79980164/how-to-make-vite-add-react-icons-to-a-separate-js-file-when-executing-npm-run
javascript, reactjs, vite
1,783,890,670
se_51647821
stackoverflow
FRONTEND_DEVELOPMENT
React - vertically align text and icon
React - vertically align text and icon I have tried all things to align vertically an icon and a text, Code: <Danger color="secondary" style={{ flex:1,justifyContent: "center",alignItems: "center" }}> <ErrorOutline className={classes.warning} /> <text numberOfLines={1} style={{ textAlignVertical: "center" }...
https://stackoverflow.com/questions/51647821/react-vertically-align-text-and-icon
css, reactjs
1,533,194,667
se_79980144
stackoverflow
FRONTEND_DEVELOPMENT
What are Wrappers in ReactJS?
What are Wrappers in ReactJS? Are the wrappers in ReactJS functions, HTML like tags, or something else? If they are functions then how they work like HTML tags(closing and opening)? <BrowserRouter></BrowserRouter> <SomeContext.Provilder value={}></SomeContext.Provider>
https://stackoverflow.com/questions/79980144/what-are-wrappers-in-reactjs
javascript, reactjs
1,783,880,785
se_48966808
stackoverflow
FRONTEND_DEVELOPMENT
How to import jQuery in a React component?
How to import jQuery in a React component? My JS file containing jQuery (apiCalls.js): function getBlogInfo() { $.ajax({ url: "http://api.tumblr.com/v2/blog/myblog.tumblr.com/info?api_key=my-api-key", dataType: 'jsonp', success: function(info){ console.log(info); console.log(info.response.blog...
https://stackoverflow.com/questions/48966808/how-to-import-jquery-in-a-react-component
jquery, reactjs
1,519,500,834
se_66027514
stackoverflow
FRONTEND_DEVELOPMENT
Full Screen on Android Chrome showing white band on Notch Area
Full Screen on Android Chrome showing white band on Notch Area The javascript code that I'm using, to fullscreen my web app, var beginFullScreen = () => { const doc = window.document; const docEl = doc.documentElement; let requestFullScreen = docEl.requestFullscreen || docEl.mozRequestFullScreen || docEl.webkitR...
https://stackoverflow.com/questions/66027514/full-screen-on-android-chrome-showing-white-band-on-notch-area
javascript, html, css, reactjs
1,612,355,090
se_52114477
stackoverflow
FRONTEND_DEVELOPMENT
Download Image with url React
Download Image with url React Im working on a picture gallery. Im trying to make a mechanism that allows user to press button and download image. I have a url to the image. How can I do this?
https://stackoverflow.com/questions/52114477/download-image-with-url-react
javascript, reactjs, image, download
1,535,714,818
se_58669189
stackoverflow
FRONTEND_DEVELOPMENT
HTML webpack plugin not injecting script to template
HTML webpack plugin not injecting script to template When trying to build the project, two HTML files get created i.e (dist/test.html and dist/src/index.html) dist/test.html /dist/src/index.html?88827167<script type="text/javascript" src="/assets/vendors.chunk.js"></script> <script type="text/javascript" src="/ass...
https://stackoverflow.com/questions/58669189/html-webpack-plugin-not-injecting-script-to-template
javascript, reactjs, webpack, webpack-4, html-webpack-plugin
1,572,680,617
se_75967860
stackoverflow
FRONTEND_DEVELOPMENT
Why in next.js &quot; use client &quot; in top of component give me this error?
Why in next.js &quot; use client &quot; in top of component give me this error? when i use "use client" in the top of my component i get this error: event - compiled client and server successfully in 2.5s (265 modules) wait - compiling... event - compiled client and server successfully in 932 ms (265 modules) wait ...
https://stackoverflow.com/questions/75967860/why-in-next-js-use-client-in-top-of-component-give-me-this-error
javascript, node.js, reactjs, next.js, next.js13
1,680,990,829
se_79980133
stackoverflow
FRONTEND_DEVELOPMENT
Why is clip-path: inset() being ignored/overridden in my React component layout?
Why is clip-path: inset() being ignored/overridden in my React component layout? I am building a banner component in React (Vite/CRA) where a smartphone image overflows out of the top of a container box, but a background blue circle needs to be clipped cleanly at the bottom edge where the smartphone graphic ends. I wa...
https://stackoverflow.com/questions/79980133/why-is-clip-path-inset-being-ignored-overridden-in-my-react-component-layout
css, reactjs, rendering, overflow, clipping
1,783,876,253
se_75427422
stackoverflow
FRONTEND_DEVELOPMENT
How to deploy React/Laravel vite website on Hostinger?
How to deploy React/Laravel vite website on Hostinger? I've been trying to deploy my Laravel React Vite website on Hostinger. I followed the instructions from Hostinger docs as below: I uploaded my website. created new .env and add my configs. created a database. added build folder from react vite after running "npm ...
https://stackoverflow.com/questions/75427422/how-to-deploy-react-laravel-vite-website-on-hostinger
php, reactjs, laravel, vite
1,676,209,637
se_76382287
stackoverflow
FRONTEND_DEVELOPMENT
React development server not reflecting changes made using vite, what could be the issue?
React development server not reflecting changes made using vite, what could be the issue? I'm building a react app, and when I run npm run dev for the first time, everything works fine, but when I make changes to my component that should appear on the UI, it doesn't auto-refresh. I even tried refreshing manually, but ...
https://stackoverflow.com/questions/76382287/react-development-server-not-reflecting-changes-made-using-vite-what-could-be-t
reactjs, create-react-app, vite
1,685,625,268
se_79446342
stackoverflow
FRONTEND_DEVELOPMENT
react-hook-form - How to correctly type generic UseFormRegister&lt;T&gt; when dealing with sub form?
react-hook-form - How to correctly type generic UseFormRegister&lt;T&gt; when dealing with sub form? I have this MacroForm.tsx, which is a separated part of the bigger form for reusability purposes. type Macro = { calories: number } interface MacroFormValues { macro: Macro; } interface MacroFormProps<T extends M...
https://stackoverflow.com/questions/79446342/react-hook-form-how-to-correctly-type-generic-useformregistert-when-dealing
reactjs, typescript, react-hook-form
1,739,818,268
se_54045665
stackoverflow
FRONTEND_DEVELOPMENT
Lazy Loading Images in Next.js and/or in other forms of React server-side rendering
Lazy Loading Images in Next.js and/or in other forms of React server-side rendering I'm using Next.js for server-side rendering of a new project. I have a basic project with routing up and running. I'm using TypeScript, but I doubt it matters. I'd like to have images lazy loaded, but I didn't find any component that ...
https://stackoverflow.com/questions/54045665/lazy-loading-images-in-next-js-and-or-in-other-forms-of-react-server-side-render
javascript, reactjs, next.js, server-side-rendering
1,546,634,087
se_50368479
stackoverflow
FRONTEND_DEVELOPMENT
How to implement video with transparent background in react-native
How to implement video with transparent background in react-native How can i implement a Video Player with transparent background in React-native? The video is saved with the extension .mov (only extension found to support transparent background). Used react-native-player but it only renders a back screen. Tried w...
https://stackoverflow.com/questions/50368479/how-to-implement-video-with-transparent-background-in-react-native
reactjs, react-native, video, mobile, react-native-ios
1,526,466,564
se_64583856
stackoverflow
FRONTEND_DEVELOPMENT
NextJS best practice for handling &quot;Server Error&quot; and &quot;Client side error&quot;
NextJS best practice for handling &quot;Server Error&quot; and &quot;Client side error&quot; Using NextJS, I see 2 kinds of errors: Server Error generated it using throw new Error(...) inside getInitialProps... it can occur due to some business logic or unexpected API response; screenshot: Unhandled Runtime Error ...
https://stackoverflow.com/questions/64583856/nextjs-best-practice-for-handling-server-error-and-client-side-error
reactjs, error-handling, next.js, server-error
1,603,936,585
se_60236606
stackoverflow
FRONTEND_DEVELOPMENT
Memory issues with Next.js
Memory issues with Next.js i am using Next.js version 8.0.4. the problem i'm facing is that when i first build the app and start it is taking almost 150 Mb memory on server but it grows gradually over time and it becomes very big in just 3 or 4 days depending on how many users are visiting my website. i have search...
https://stackoverflow.com/questions/60236606/memory-issues-with-next-js
node.js, reactjs, webpack, next.js
1,581,750,106
se_72557334
stackoverflow
FRONTEND_DEVELOPMENT
React Hook Form and setValue of file input
React Hook Form and setValue of file input I'm facing issue with setting the value of file input with multiple files choice. In a form i have two file input fields, one allows user to select only one file, and the second allow multiple files. So while applying setValue to the singular file input, it works fine and fil...
https://stackoverflow.com/questions/72557334/react-hook-form-and-setvalue-of-file-input
reactjs, react-hook-form
1,654,764,513
se_74958609
stackoverflow
FRONTEND_DEVELOPMENT
Redux + Persist with tab state sync and disabling serializableCheck
Redux + Persist with tab state sync and disabling serializableCheck I use redux toolkit + redux-persist with state sync across tabs, everything works fine, config looks like this: export const store = configureStore({ reducer: persistedReducer, middleware: [ createStateSyncMiddleware({ blacklist:...
https://stackoverflow.com/questions/74958609/redux-persist-with-tab-state-sync-and-disabling-serializablecheck
javascript, reactjs, redux, react-redux, redux-persist
1,672,379,953
se_69425243
stackoverflow
FRONTEND_DEVELOPMENT
How to handle Play Pause state with autoplay
How to handle Play Pause state with autoplay I have a problem with the autoplay policy it completely messes my custom layout. In the component, there is a "play" state by default set as true to trigger autoplay but after refreshing a page autoplay doesn't work even if the "play" state is set as true. Now the problem i...
https://stackoverflow.com/questions/69425243/how-to-handle-play-pause-state-with-autoplay
javascript, reactjs, react-player
1,633,267,360
se_48643716
stackoverflow
FRONTEND_DEVELOPMENT
Webpack dev server hot reloading not working with reactjs, though i have done &quot;inline:true&quot;?
Webpack dev server hot reloading not working with reactjs, though i have done &quot;inline:true&quot;? Why does Hot Module Replacement stop working on webpack dev server? My package.json file: { "name": "routing-react", "version": "1.0.0", "description": "Just a little ReactJS Training Ground", "main": "inde...
https://stackoverflow.com/questions/48643716/webpack-dev-server-hot-reloading-not-working-with-reactjs-though-i-have-done-i
javascript, reactjs, webpack, webpack-dev-server, webpack-hmr
1,517,922,148