Skip to content

Tag: react-native

Jest testcase breaking in React Native Expo

Following is the error I receive on running a Sample testcase: My Testcase: My jest configuration in package.json: My dependencies in package.json: expo version: 37.0.0 react: `16.9.0 react-native: “https://github.com/expo/react-native/archive/sdk-37.0.1.tar.gz” Answer Found the solution on the Ex…

How to override React Native Component?

Dear Friend I am trying to override a method in react native component, please let me know how I can achieve that. Answer There is no such a thing as component override as I know. But if you want to customize the component then you can wrap with with another component and you can use props for access the defa…

Parsing JSON object with AsyncStorage

I am basically trying to write and read a simple object. Writing: AsyncStorage.setItem(‘@Test’, JSON.stringify(newStudent)) Reading: console.log(JSON.parse(AsyncStorage.getItem(‘@Test’))) But im getting “Uncaught SyntaxError: Unexpected token o in JSON at position 1”. I Als…