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

Error: Seems you're trying to access 'ReactNative.createClass' from the 'react-native' package #15

Open
christophby opened this issue Jul 12, 2016 · 3 comments

Comments

@christophby
Copy link

With react-native 0.29.0 I got the error-message

Seems you're trying to access 'ReactNative.createClass' from the 'react-native' package. Perhaps you meant to access 'React.createClass' from the 'react' package instead?
For example, instead of:
import React, { Component, View } from 'react-native';
You should now do:
import React, { Component } from 'react';
import { View } from 'react-native';

To fix this in 'index.js'

var React = require('react-native');
var { StyleSheet, Text, View, TextInput, Animated } = React;

should be changed to

import React from 'react';
import { StyleSheet, Text, View, TextInput, Animated } from 'react-native';
@SleepyFanjo
Copy link

I have the same error message with same version of react

@3DJakob
Copy link

3DJakob commented Oct 29, 2016

Got it working, thanks a bunch!

@eyaleizenberg
Copy link
Owner

still an issue?

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

4 participants