Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rehydrating a Map with integers as keys turns them into strings. #74

Open
schumannd opened this issue May 8, 2019 · 1 comment
Open

Comments

@schumannd
Copy link
Contributor

schumannd commented May 8, 2019

I can imagine this has to do with using react natives AsyncStorage, which only saves strings.

We should find a way to save the type of the key before saving them to async storage. Once saved there I think it is not possible to find out the type again.

Maybe this is an issue with all integers?

Easily reproducible by creating a @persist Map<number, whatever>, then saving something in it, rehydrating, and its key has changed from int to string.

@Emixam23
Copy link

Emixam23 commented Feb 13, 2020

I have a similar issue:

@observable public Categories: Map<string, boolean>;

which is a becomes a and don't have the value after hydrating..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants