12345678910111213141516171819202122232425262728293031 |
- /** @module player/state */
- /**
- * state.js
- *
- * Collection of everything which has to do with state changes.
- **/
- /** actionTypes define what actions are handeled by the reducer. */
- export const actions = {
- setState: players => {
- return {
- type: 'SET_PLAYERS',
- players
- }
- }
- }
- console.log('State actions', actions)
- /** state definition */
- export const state = {}
- console.log('State state', state)
- /** reducer is called by the redux dispatcher and handles all component actions */
- export function reducer (state = [], action) {
- let nextState = state
- return nextState
- }
- /** sagas are asynchronous workers (JS generators) to handle the state. */
- export function * saga () {}
|