Closed erksch closed 1 year ago
@ReactNativeModule("MyRNModule") class MyRnModule() { @ReactNativeFlow fun myFlow(myParam: List<String>): Flow<Int> = ... }
Before
interface MyRNModuleInterface { myFlow: Next1<number, string[]>; } const MyRNModule: MyRNModuleInterface = { ...NativeModules.MyRnModule // no wrappers for myFlow }
After
const MyRNModule: MyRNModuleInterface = { ...NativeModules.MyRNModule, myFlow: (currentValue: string | null, arg: string[]) => NativeModules.MyRNModule.myFlow( currentValue, JSON.stringify(arg) ), }
I am releasing this as a patch release. Because it does not break existing primitive argument flows and fixes broken complex flows.
Before
After