Hi all, wondering anyone here worked on consuming kotlin code in React without kotlin-react-wrappers. I’m looking for a more elegant way to consume a
Flow<State>
with a reach-hook
b
Big Chungus
01/06/2022, 10:20 PM
Have a look at how its rxJava interop is implemented and replicate that for rxJs?
👀 1
p
Peter Hsu
01/24/2023, 10:39 PM
Curious what approach you ended up taking?
x
xxfast
01/29/2023, 9:43 PM
I ended up with the approach mentioned in the linked thread, although it is not that nice because of the unmanaged collection 😔
p
Peter Hsu
01/31/2023, 4:05 PM
How did you mitigate it? I am structuring my view models exactly in the same way, utilized in a React project. I was going to rely on lifecycle events like componentWillUnmount and ensure that always calls a method that unsubscribes on the viewmodel.