I wish to initialise a state (list) from a API endpoint.
What's the best way of doing this? For example, would you supply a starting state into the reducer, or would the starting state in the reducer be empty and somehow have an action for the new state?
I am considered using redux-thunk to do this sort of thing, but a simple example of how to do the above would be great.
let startState = {};
//some form of URL fetch here or supply data through action?
const reducer = (state = startState, action) => {
...
}