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

typeerror:undefined is not an object (evaluating 'torch.switchstate') #12

Open
761114234 opened this issue Oct 19, 2018 · 3 comments
Open

Comments

@761114234
Copy link

I use:
"dependencies": {
"react": "16.3.1",
"react-native": "0.55.4",
"react-native-torch": "^1.1.4"
},

...
import Torch from 'react-native-torch';
...
Torch.switchState(true);
...

Same error in android:
Possible Unhandled Promise Rejection(id:0):
typeError:undefined is not an object(evaluating 'Torch.switchState')

@EYproductions
Copy link

Same problem as you

@samyachour
Copy link

samyachour commented Dec 7, 2018

Try the manual install instructions

EDIT:

Found a similar thread, the consensus seemed to be you have to rebuild your app. You can't just add a library and then reload the bundler.

@ajaymarathe
Copy link

Hey Rebuilding the app works for me :)
so try it out

react-native run-android then try it should work

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
@samyachour @EYproductions @761114234 @ajaymarathe and others