Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"React is not defined" #4

Open
davidguttman opened this issue Apr 4, 2015 · 4 comments
Open

"React is not defined" #4

davidguttman opened this issue Apr 4, 2015 · 4 comments

Comments

@davidguttman
Copy link

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');
@dujuanxian
Copy link

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.

@tvogels
Copy link

tvogels commented Sep 14, 2015

Did you solve this issue, @dujuanxian? I have the same problem.

@peterbe
Copy link

peterbe commented Oct 9, 2015

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 :(

@gurusubramaniam
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants