Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

How will you solve two components deep down different branches that share state?


for shared state I used localStorage/AsyncStorage and added an event emitter to it.


What about scenarios where that's unavailable? E.g. Safari in private browsing mode?


I use them for persistence, so state is kept between visits.

But in private mode I'd simply use an object as key-value-store.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: