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

change how to load object into store #9

Open
kenta88 opened this issue Jul 27, 2017 · 0 comments
Open

change how to load object into store #9

kenta88 opened this issue Jul 27, 2017 · 0 comments

Comments

@kenta88
Copy link
Owner

kenta88 commented Jul 27, 2017

const persistedObjects = localStorage.getItem('objects') ? JSON.parse(localStorage.getItem('objects')) : [];
export const initialState: Map<string, any> = fromJS({
    isEditMode: false,
    isAddingMode: false,
    currentObject: null,
    objectWillSelected: null,
    objects: [],
    level: 0,
}).set('objects', fromJS([]).concat(persistedObjects));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant