callstack / react-native-brownfield

Set of helpers to make your brownfield integration smooth and easy.
MIT License
225 stars 14 forks source link

Added the ability to initialize module with your own bridge #45

Open lukebrandonfarrell opened 3 years ago

lukebrandonfarrell commented 3 years ago

Summary

In our use-case we already had a React Native bridge initialised. Our app is built with React Native but integrated a native only library, one of the actions from this library was intended to open one of our existing pages in React Native, hence this implementation. This use-case seems as if it would be useful for others, it does not change existing behaviour.

This solves the problem of not being able to init a module using your own bridge instance.

Todo

[[ReactNativeViewController alloc] initWithModuleName:@"BillingPlansScreen" withBridge:bridge];

I'll work on the remaining implementations over next week or two, just wanted to get a sense of what others think about this feature.