Git Product home page Git Product logo

Comments (4)

michaelcontento avatar michaelcontento commented on June 10, 2024

Hi,

this completely depends on the redux-storage-engine you use!

For all engines I've created (for example redux-storage-engine-localstorage) your observation is indeed true.

In the case of redux-storage-engine-localstorage the scoping is only based on the browsers behaviour of localStorage.getItem and localStorage.setItem. So if you host both redux apps under the same domain the keyspace is shared.

With redux-storage-engine-reactnativeasyncstorage the scoping should be based on the appId (I haven't doubled checked this).

So from redux-storage point of view this detail is 100% in the hand of the engine. And for all my engines this behaviour is "by design". 😄

Is there anything wrong with this? Is there a special case why you host two different apps under the same domain? Is there anything that forces you to use a single save-key for multiple apps?

from redux-storage.

EmilScherdin avatar EmilScherdin commented on June 10, 2024

Hmm, okey.

I use the redux-storage-engine-reactnativeasyncstorage. And it's no actual problem for me using two different save-keys. This is what I'm doing now. 😄

But it feels wrong that i could get access to the first apps data from the second app. If that would happen with other apps on the users phone it's pretty bad.

If redux-storage-engine-reactnativeasyncstorage scopes on appId, this should not be able to happen?

from redux-storage.

michaelcontento avatar michaelcontento commented on June 10, 2024

Hm .. redux-storage-engine-reactnativeasyncstorage is simply based on AsyncStorage.getItem and AsyncStorage.setItem (as you can see here). I haven't double checked this but I would assume that react-native keeps the AsyncStorage seperated by app.

If there is something wrong and/or buggy, please report this issue to the react-native team!

from redux-storage.

EmilScherdin avatar EmilScherdin commented on June 10, 2024

Okey, will dig a bit deeper in to it. Thanks for the quick replies! 👍 🎉

from redux-storage.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.