Quantcast
Channel: Active questions tagged react-native+typescript - Stack Overflow
Viewing all articles
Browse latest Browse all 6581

Trying to export a component from an inner directory but getting undefined error

$
0
0

So, I need to make an SDK such that all the files in it can be used in any react native project by just including it in the package.json. Now I'm trying to test it with AsyncStorage function TestAsyncStorage. I defined it inside module and added the module as a dependency in the outer package.json. I'm able to import it but when I use it and run yarn android I get TestAsyncStorage undefined. What am I doing wrong?

 Invariant Violation: "SeventyOne" has not been registered. This can happen if:* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called., js engine: hermes

Getting this error too

I am expecting to use an inner directory as a module that could be used in any react native file.


Viewing all articles
Browse latest Browse all 6581

Latest Images

Trending Articles



Latest Images