App crashes with error: React is not defined
See original GitHub issueSteps:
- Bootstrap an application using create-react-app (npx create-react-app my-app --template typescript)
- Add the dependencies npm install @table-library/react-table-library @emotion/react)
- App crashes with following error:
Uncaught ReferenceError: React is not defined
at x (objectWithoutProperties.js:19:1)
at renderWithHooks (react-dom.development.js:16141:1)
at mountIndeterminateComponent (react-dom.development.js:20838:1)
at beginWork (react-dom.development.js:22342:1)
at beginWork$1 (react-dom.development.js:27219:1)
at performUnitOfWork (react-dom.development.js:26392:1)
at workLoopSync (react-dom.development.js:26303:1)
at renderRootSync (react-dom.development.js:26271:1)
at performSyncWorkOnRoot (react-dom.development.js:25924:1)
at flushSyncCallbacks (react-dom.development.js:11982:1)
Issue Analytics
- State:
- Created a year ago
- Comments:12 (4 by maintainers)
Top Results From Across the Web
React App crashes giving as useState input give an undefined ...
Variables transactionName , setTransactionName , amount and setAmount are not declared. You can either use const or let to declare them.
Read more >`@vitejs/plugin-react@1.1.4`: `ReferenceError: React ... - GitHub
4 , the app crashes with error message ReferenceError: React is not defined . It seems to be related to the bug fix...
Read more >Error Boundaries - React
A class component becomes an error boundary if it defines either (or both) of the lifecycle methods static getDerivedStateFromError() or componentDidCatch() .
Read more >App Center Crashes for React Native - Microsoft Learn
App Center Crashes will automatically generate a crash log every time your app crashes. The log is first written to the device's storage...
Read more >How to solve "window is not defined" errors in React and Next.js
The "React" way to solve this issue would be to use the useEffect React hook. Which only runs at the rendering phase, so...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@rwieruch I installed the latest one and it is working as expected. Thanks for the quick turnaround.
I was using the exact example from the README.md (https://github.com/table-library/react-table-library#usage).
to get it working I had to change
const data = { nodes }
toconst data = { nodes : nodes }
and therenderCell: (item)
torenderCell: (item: any)
because of the noImplicitAny warning.