DEV Community

Discussion on: Sharing UI Event State in React With RxJS

Collapse
 
jschuster profile image
Johann Schuster • Edited

This isn't meant to be a replacement ;) I tried to emphasize that you can use a behaviourSubject to listen to changes anywhere in your app, especially outside of hooks reach. This is only a small example of many UI streams that my app needs to react to and the target devices are unable to handle all the calculations React makes under the hood. Lastly, the post serves as an intro to "reactive programming", not opposing React api's at all :)

Collapse
 
mateiadrielrafael profile image
Matei Adriel

Well, when I was googled rxjs react and found something similar to this I wanted to drop the idea since just having to subscribe/unsubscirbe manually inside lifecycle methods seemed ugly to me, but then I discovered rxjs-hooks and haven't looked back ever since

Thread Thread
 
jschuster profile image
Johann Schuster

Nice 👍

Thread Thread
 
jschuster profile image
Johann Schuster

Nice 👍 will check it out !