So here is what my code looks like
---------index.js-----
var React =require(\'react\');
var ReactDOM =require(\'react-dom\');
var App=require(\'../compo
You're mixing up require
, and import
/ export
.
Since you're running webpack, all of your React code (and anything that gets transpiled by babel via webpack) should stick to using import/export. require
should only be used in places like js that's directly run by node.
In your index.js, change all the requires to imports and see if that helps.