Flux stores will be setup for the logged in user, fantasy leagues, players (professional) and teams. They will be used to store all the information for these items as it is retrieved from the database.
Updating a Store
A store will be updated after a certain time interval (tbd). This updating will trigger a re-rendering of all listening components. They may also be updated on a call to a given action/method.
What to Include in Components
For components that use a store, they will need to listen to change events that it triggers. In order to do this, components must include the following in the component's class:
How to Design and Use a Store
Flux stores will be setup for the logged in user, fantasy leagues, players (professional) and teams. They will be used to store all the information for these items as it is retrieved from the database.
Updating a Store
A store will be updated after a certain time interval (tbd). This updating will trigger a re-rendering of all listening components. They may also be updated on a call to a given action/method.
What to Include in Components
For components that use a store, they will need to listen to
change
events that it triggers. In order to do this, components must include the following in the component's class:If you wish to run some function as soon as the component loads and need to pass in a ref value, use the following code:
This code should only be used to initiate the loading of data into a store and not the retrieval of it.