Please provide the following:
- SDK Version: 5.4.6
- Platforms(Android/iOS/web/all): iOS
- Add the appropriate “Tag” based on what Expo library you have a question on.
I’m new to react native, so my question is that I’m trying to import mock data from tests folder. It works fine on expo, but the local version doesn’t. Anyone knows why?
My snack is here: import mock data from test - Snack
and my local files are here: GitHub - dotku/react-native-lab
I’m sorry, I don’t 100% understand your question. Do you mean this works in Snack, but then isn’t working when you are trying to do with
expo start or
yarn start from the command line?
If ccheever has understood you correctly, maybe you could move your mock data to a different location and then import it from that location in your tests and also import it from that location in your code.
Also, note that tags like
<li> will not work on Android and iOS. One alternative would be to use something like react-native-paper’s
List.Item instead. I’ve also tweaked the exports from you
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.