Description
Do you want to request a feature or report a bug?
Bug
What is the current behavior?
Since #2679, we use DeepPartial
for the type of preloadedState
.
This means that, given a state tree, all properties at any level in the tree are optional.
What is the expected behavior?
Given a state tree, only properties whose state is computed by a reducer should be optional. This is because reducers have initial state, but the state within them may be required (unless those properties are explicitly marked as optional or they represent reducers).
Which versions of Redux, and which browser and OS are affected by this issue? Did this work in previous versions of Redux?
N/A
I'm not quite sure how we can write the type definition to match the expected behaviour. Any ideas?
Related #2552