Uncaught Error: Minified React Error #130
So here is what my code looks like ---------index.js----- var React =require('react'); var ReactDOM =require('react-dom'); var App=require('../components/App'); ReactDOM.render(&l
Solution 1:
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.
Solution 2:
In the file index.js
, you should change your code like this:
var App = require('../components/App').default;
or use import
import App from '../components/App';
I recommend using a unified usage. You can import/export
or module.exports/require
.
Post a Comment for "Uncaught Error: Minified React Error #130"