DEV Community

Discussion on: State Management with a Single Line of Code

Collapse
 
tojacob profile image
Jacob Samuel G.

I love that you use rxjs. I was going to write something similar (not so good) for my next project. It may be irrelevant, but what happens when LocalStorage is not available? Personally I use "Persistore" to handle storage, as I am confident in the falls back it offers. I haven't checked the Active source code yet. Do you think it could support plugins to handle persistence?

Collapse
 
dabalyan profile image
Ankit Singh • Edited

thanks :)

are you referring to usage in NodeJS environment? Because all modern browsers have localStorage afaik. And if it's not available then plugins won't be able to help there.

that being said, yes you can replace the storage used for persistence, anything that implements the Storage developer.mozilla.org/en-US/docs/W... interface can be used, see docs.activejs.dev/guides/persistence.