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

initial data is bad idea needs to rethink #13

Open
MiroslavPetrik opened this issue Dec 27, 2024 · 0 comments
Open

initial data is bad idea needs to rethink #13

MiroslavPetrik opened this issue Dec 27, 2024 · 0 comments

Comments

@MiroslavPetrik
Copy link
Owner

The initial data can work with action similarly like initial state works with useReducer().
That means that it becomes the value/data even when the envelope state is in failure or invalid mode. Currently the types indicate that it would be null which is wrong.

Also it should be optional, currently its required on the Action component.

Finally, it should be separate from the success data, because both initial and success data could be const string types, which won't fit the current single generic slot.

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