kadirahq / mantra

Mantra - An Application Architecture for Meteor
https://kadirahq.github.io/mantra/
978 stars 52 forks source link

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

Open itsdevcoffee opened 8 years ago

itsdevcoffee commented 8 years ago

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 commented 8 years ago

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