All Questions
Tagged with reactjs javascript
73,355
questions with no upvoted or accepted answers
33
votes
2
answers
24k
views
"This Suspense boundary received an update before it finished hydrating." Error when using suspense and dynamic import in Nextjs
I'm trying to lazy load a list of data with suspense and dynamic import in Nextjs. But getting following error:
Error: This Suspense boundary received an update before it finished hydrating. This ...
25
votes
0
answers
2k
views
Using Apollo's writeFragment to update nested list
I am working on a application in which a ship can be configured using rudders and other stuff. The database structure is sort of nested, and so far I have been keeping my GraphQL queries in ...
22
votes
1
answer
1k
views
React native (expo) web view Error net::ERR_CACHE_MISS
I am using react native(expo) and try to use web view package
And i am getting this warning in console and didn't see anything on mobile screen.
"sdkVersion": "36.0.0",
"expo": "~36.0.0",
...
22
votes
3
answers
5k
views
TypeScript issue with styled-component's "css" prop and Storybook
I'm having issues with enabling styled-component's css prop in TypeScript as soon as I import something from Storybook, because Storybook depends on @emotion/core, whose type declaration defines ...
18
votes
2
answers
5k
views
How can I conditionally disable a control in Storybook based on the value of another argument?
I am trying to conditionally disable a Storybook.js control based on the value of another argument. For example, I have a modal component that can be of type 'alert', 'confirmation', 'content', or '...
18
votes
1
answer
3k
views
How to stub a module function with Cypress?
I want to create a test with Cypress that has a React component that uses an auth library (@okta/okta-react) with a HOC (withOktaAuth).
My component looks like this:
// Welcome.js
import { ...
18
votes
1
answer
2k
views
React Router V4 protected private route with Redux-persist and React-snapshot
I'm implementing private route like so using React Router Route Component:
function PrivateRoute({component: Component, authed, emailVerified, ...rest}) {
return (
<Route
{...rest}
...
18
votes
2
answers
6k
views
NextJs export folder "out" doesn't have index.html
I’ve built a Next.js app, and I wanted to use static exporting to host the project on my hosting. The app is simple, so I didn’t use most of the features that Next.js offers. When I run:
npm run build ...
17
votes
0
answers
2k
views
Next.js SSG Image Optimization at Build Time
Problem
I am trying to use image optimization for local files inside the public directory in a SSG Next.js project.
There have been quite a few discussions on Github about introducing the possibility ...
16
votes
0
answers
3k
views
GraphQL String interpolation is not allowed in graphql tag
I know there are so many questions about this issue, but I honestly can't understand any of the answers.
What I understand is that everything happens at build time, and my code supports that.
What I ...
15
votes
1
answer
4k
views
detect when another view is touched - dragging with PanResponder in react native
I have a card game where the user can drag cards around a screen.
How can I detect if the cards have been dragged over other View components? My draggable card code is like this:
// A draggable ...
14
votes
0
answers
14k
views
UnhandledPromiseRejectionWarning: TypeError: Caught error after test environment was torn down
Get Error when test fails case in post request image for Error when running test
Using Reactjs framework version 16
axios-hooks for api requests
react-testing-library for test
...
14
votes
1
answer
11k
views
How to make Previews in react-dropzone work with files other than images?
I need help with how to make the react-dropzone NPM package in making uploaded files show a preview on files other than Image files (*.png, *.jpg/jpeg, *.gif, etc. — those all generate a preview just ...
13
votes
1
answer
16k
views
webpack 5 - Parsed request is a module
I'm creating webpack5 setup for an small app and while doing I'm facing the below mentioned issue. Please suggest the way to resolve
Issue Snapshot
Module not found: Error: Can't resolve 'faker' in 'C:...
13
votes
2
answers
9k
views
WebPack - TypeError: __webpack_modules__[moduleId] is not a function (development) // Error: Invalid hook call (production)
I'm struggling with a WebPack error that occur when I use my custom library hosted as a package and streamed with NPM Link. Meanwhile, the production version works perfectly
Here is my scripts
"...