Skip to content

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

@Ruchika1989

Description

@Ruchika1989

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions