Closed aceshim closed 5 years ago
Hi @pensivej,
There isn't a way to set an initialState for a contract field. This is calculated from a contract's abi.
Drizzle does, however, support passing custom middle-wares, reducers and sagas to be managed by its redux instance. If this is your use case, you can define the initial state by setting the default state object in the associated reducer.
// Note: todosReducer's initial state will be `[]`
const todosReducer = (state = [], action) => {
if (action.type === TODOS_RECEIVED) {
// update your state
return action.todos
}
return state
}
Hi @pensivej. I will close this issue, but please feel free to reopen if you would like to continue the discussion.
Hi, I am trying to initialize drizzle store with my custom initial states
In generateStore() , there is no way to pass down the initialState.