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

when i try to used this Switch component i got this error. #17

Open
Ruchika1989 opened this issue Dec 20, 2016 · 3 comments
Open

when i try to used this Switch component i got this error. #17

Ruchika1989 opened this issue Dec 20, 2016 · 3 comments

Comments

@Ruchika1989
Copy link

this is how i used it

import React, { Component } from 'react';
import { Image,TouchableOpacity ,Text , Alert} from 'react-native';
import { connect } from 'react-redux';
import { actions } from 'react-native-navigation-redux-helpers';
import { Container, Content, InputGroup, Input, Button, Icon, View ,Header, Title} from 'native-base';
import { Grid, Row } from 'react-native-easy-grid';
import { setUser,fetchRecipes } from '../../actions/user';
import styles from './style';
import globle from './../../globle_style/globle';
import myTheme from '../../themes/base-theme';
import Switch from 'react-native-material-switch';

Unhandled JS Exception: 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';

Check the release notes on how to upgrade your code - https://github.com/facebook/react-native/releases/tag/v0.25.1

reactConsoleErrorHandler @ ExceptionsManager.js:71

@Jazz747
Copy link

Jazz747 commented Jan 9, 2017

Please try to fix this asap.

@skv-headless
Copy link
Contributor

skv-headless commented Jan 16, 2017

It is fixed in master. Just add into package.json
"react-native-material-switch": "recr0ns/react-native-material-switch#853e22d5a60d9a69bb0437f3ebe5d501ff7f9de0"

@Jazz747
Copy link

Jazz747 commented Jan 16, 2017

Thank you, works now. Although it is getting 'cut'. There is already an error report about this issue here.

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

3 participants