If you are using Babel and React 17, you might need to add “runtime”: “automatic” to config.
{
"presets": [
"@babel/preset-env",
["@babel/preset-react", {"runtime": "automatic"}]
]
}
More Related Contents:
- Single Page Application and CSRF Token
- Unable to access React instance (this) inside event handler [duplicate]
- Why do we need middleware for async flow in Redux?
- Push method in React Hooks (useState)?
- Rendering raw html with reactjs
- How do I conditionally add attributes to React components?
- Correct way to handle conditional styling in React
- Intercept/handle browser’s back button in React-router?
- Is it possible to share states between components using the useState() hook in React?
- react router doesn’t work in aws s3 bucket
- React Routing works in local machine but not Heroku
- How do you send images to node js with Axios?
- When to use JSX.Element vs ReactNode vs ReactElement?
- React useState hook event handler using initial state
- Recommended way of making React component/div draggable
- React: why child component doesn’t update when prop changes
- How to store Configuration file and read it using React
- React: trigger onChange if input value is changing by state?
- Is store.dispatch in Redux synchronous or asynchronous
- How do I setState for nested object?
- First Load JS shared by all is rather heavy in next.js
- useEffect is running twice on mount in React
- React – useState – why setTimeout function does not have latest state value?
- How to create a protected route with react-router-dom?
- “You may need an additional loader to handle the result of these loaders.”
- How to properly use useHistory () from react-router-dom?
- React Error: “SharedArrayBuffer is not defined” in Firefox
- Object is not extensible error when creating new attribute for array of objects
- How to set iframe content of a react component
- How should I alternate componentWillMount()?