react-semantic-ui
react-semantic-ui copied to clipboard
"React is not defined"
Using react-semantic-ui like this:
var React = require('react')
var rsui = require('react-semantic-ui')(React)
Causes:
Uncaught ReferenceError: React is not defined (common.js:2)
// common.js
var cache = { id: 0 },
reactBackboneAware = !!React.mixins.exists('modelFieldValidator');
I got the same error, After I defined the
var React = global.React = require('react');
var rsui = require('react-semantic-ui')
I got the 'exist' not defined error.
Did you solve this issue, @dujuanxian? I have the same problem.
I suffer from this too. I'm using ES6. I tried:
import React from 'react';
import rsui from 'react-semantic-ui';
console.log(rsui(React));
But I too get ReferenceError: React is not defined :(
Even im facing the same issue. using ES6 with React 14 and webpack. everything is working in the ES5 version. But after converting all files to es6 i get React is not defined :(
Here is my git repo. https://github.com/gurusubramaniam/reactSample