javascript - Initialise redux state from uri -


i wish initialise state (list) api endpoint.

what's best way of doing this? example, supply starting state reducer, or starting state in reducer empty , somehow have action new state?

i considered using redux-thunk sort of thing, simple example of how above great.

let startstate = {};  //some form of url fetch here or supply data through action?  const reducer = (state = startstate, action) => {     ... } 


Comments

Popular posts from this blog

php - Vagrant up error - Uncaught Reflection Exception: Class DOMDocument does not exist -

vue.js - Create hooks for automated testing -

Add new key value to json node in java -