question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

App crashes with error: React is not defined

See original GitHub issue

Steps:

  1. Bootstrap an application using create-react-app (npx create-react-app my-app --template typescript)
  2. Add the dependencies npm install @table-library/react-table-library @emotion/react)
  3. 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:closed
  • Created a year ago
  • Comments:12 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
deepakjacobcommented, Apr 9, 2022

@rwieruch I installed the latest one and it is working as expected. Thanks for the quick turnaround.

1reaction
proddycommented, Apr 9, 2022

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 } to const data = { nodes : nodes } and the renderCell: (item) to renderCell: (item: any) because of the noImplicitAny warning.

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found