How to create-react-native-library?

155 views Asked by At

I had created a project with create-react-native-library react-native-testsdk, there is only one iOS and one android module (testsdkViewManager) file but I have 4 native module class and 1 native view class for each iOS and android. Should I bring them all in one file? Also boilerplate comes with:

export const testsdkView =
UIManager.getViewManagerConfig(ComponentName) != null
? requireNativeComponent(ComponentName)
: () => {
throw new Error(LINKING_ERROR);
};

This is for native view how can I also add native module to my index.tsx file ?

I want to publish my native modules as npm package so everyone can use it without coding java&swift.

0

There are 0 answers