ReferenceError: React is not defined
See original GitHub issueHello,
I testing my react application with Mocha and when I run npm test
I got the exception:
`app/DOM/pure/landing-assets/logo.svg:3
React.createElement(
^
ReferenceError: React is not defined`
How I can solve this problem?
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
Uncaught ReferenceError: React is not defined
Possible reasons are 1. you didn't load React.JS into your page, 2. you loaded it ...
Read more >Getting "Uncaught ReferenceError: react is not defined".
Hi Louie Ambriz, It's hard to tell without seeing your code but it sounds like React is not being loaded into your project....
Read more >[v4]ReferenceError: React is not defined · Issue #9882
I have submitted PR #9885 to fix this. This is because the jsx-runtime configuration gets removed webpack config during the ejection process ......
Read more >Frequently Asked Questions
I see ReferenceError: React is not defined when using storybooks with Next.js. Next automatically defines React for all of your files via a...
Read more >React is not defined after migrating to React 17 - help
Hello, I migrated to React v17. I know that now it is not necessary to import React from 'react'; so I deleted it...
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 FreeTop 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
Top GitHub Comments
@whois42 Have you solved the issue? Is there some info for people who may encounter it too?
If anyone ends up here like I did, this might be helpful https://github.com/jhamlet/svg-react-loader/issues/31.