toss / use-funnel

A powerful and safe step-by-step state management library
https://use-funnel.slash.page
MIT License
192 stars 25 forks source link

feat(core, docs): Add `SetStateAction` type of setting history context #29

Closed minuukang closed 2 months ago

minuukang commented 2 months ago

When transitioning to union type, if the type does not match the current type of staff, you will not be able to deduce the exact type. Also, some people would prefer to save the status of React's SetStateAction, but this was not considered.

Add a SetStateAction type that takes the current context in current step of a callback and specifies the context for the next step.

close #28