[Feature request] Function value for defaultState

Author: dpiktCreated May 22, 2019Updated May 25, 2020

There are times when I reinitialize my store (by setting state = undefined) and I want the defaultValue to be computed again. A function value for defaultState could enable this:

javascript

function getDefaultState () {
   return {  thing: localStorage.getItem('thing') }
}

const reducer = handleActions({}, getDefaultState)

Thoughts?

Source: redux-utilities/redux-actions