React is not defined
See original GitHub issueI have a fresh “create-react-app” install (https://github.com/facebookincubator/create-react-app).
- I ran
npm install survey-react --save(everything is alright, something new in node modules!) - Then I added
import 'survey-react/dist/survey.react.min'right afterimport React, { Component } from 'react';inApp.js - Run the server with
npm start
Running it says:
survey.react.min.js:10 Uncaught ReferenceError: React is not defined
Is there any way to work around this problem? (feel free to close this issue if it’s not relative to your lib!)
Issue Analytics
- State:
- Created 7 years ago
- Comments:27 (15 by maintainers)
Top Results From Across the Web
Uncaught ReferenceError: React is not defined - Stack Overflow
Possible reasons are 1. you didn't load React.JS into your page, 2. you loaded it ...
Read more >'X' is not defined react/jsx-no-undef Error in React | bobbyhadz
The React.js error "X is not defined react/jsx-no-undef" occurs when we forget to import a function, class or a variable in our code...
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 - GitHub
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 >React not defined | React import error - YouTube
Join this channel to get access to perks:https://www.youtube.com/channel/UCoSpmr2KNOxjwE_B9ynUmig/joinMy GearCamera ...
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

@dmitrykurmanov I created a new react project and added your code. It is working: https://github.com/kbrown/surveyjs-create-react-app-example . I have not yet gone back to diff with my other project to see what was wrong. Thank you.
That looks like it fixed it. Thanks!