Open skyshader opened 7 years ago
You can do this today by making sure your reducer alwags returns an expiration key on its root. If you want config level settings yo can put a PR together where a reducer name is passed along with a key and an expiration which is injected on the inbound function
@iou90 Still all the config remains at one place, ie., at the time of creating an instance. I was wondering if the expiration triggers REHYDRATE in the affected reducers. If it does, I can set up the default state there itself. If not then this seems like a good solution.
The example shows how to provide default value at the time of creating an instance:
Can I configure somehow the
defaultState
to be defined at reducer level?