Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support expiredState: undefined #34

Open
VinceBT-BG opened this issue Feb 24, 2023 · 0 comments
Open

Support expiredState: undefined #34

VinceBT-BG opened this issue Feb 24, 2023 · 0 comments

Comments

@VinceBT-BG
Copy link

VinceBT-BG commented Feb 24, 2023

The initial state of the key in my reducer is undefined but after expiration it gets reset to {} which is truthy so it breaks my app, would it be possible to pass undefined or state that the element should be cleared ?

PS: You have examples using expiredState: [] but you are using Object.assign({}, config.expiredState) so anything other than an object will always return empty object, see screenshot:
Capture d’écran 2023-02-24 à 17 16 19

PS2: Why not make expiredState a function that returns a state, so it is possible to return undefined, while still being able to just not pass the function to not have a state reset

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant