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

Where is the best place to put your initial states with Reactive Dict/Local State #182

Open
itsdevcoffee opened this issue Apr 7, 2016 · 1 comment

Comments

@itsdevcoffee
Copy link

Currently I'm setting the state inside of main.js. I have a state.js file that I import and initialize. So inside that file I'll set all my default states such as LocalState.set('REGISTER_TYPE', 'user'). That way I can visually see every LocalState I have set. Just wondering if this is a good practice or if there would be a better place to initialize the state.

@zimt28
Copy link

zimt28 commented Apr 16, 2016

What about your module's index.js file? You can have a load function there to initialize state.

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