-
-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat: useStateHistory #709
Conversation
223f50f
to
14402fd
Compare
What do you think about calling it |
Current name is draft. |
I've been thinking about |
…ber) method; impl(useStateHistory): improved story demo; impl(useStateHistory): docs;
bd81db5
to
8558b58
Compare
4baf4c2
to
7e57723
Compare
…ber) method; impl(useStateHistory): improved story demo; impl(useStateHistory): docs;
impl(useStateHistory): improved docs;
… inability to make intuitive behavior; refactor(useStateWithHistory): changed call signature; refactor(useStateWithHistory): reworked setState method to shift elements on capacity reach;
fix(useStateWithHistory): make the history position work properly on init;
…story # Conflicts: # src/__stories__/util/resolveHookState.ts # src/index.ts
Finalized and mergable now |
Reviewing... |
@streamich there been some files got in PR from rebase, deleted them now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are the conceptual differences of this useStateWithHistory
hook from useStateList
hook? Can we combine them together into one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
# [13.10.0](v13.9.0...v13.10.0) (2019-11-28) ### Features * useStateHistory ([#709](#709)) ([0a66359](0a66359))
🎉 This PR is included in version 13.10.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
Description
Introducing hook that stores defined amount of previous state values and provides handles to travel through them
Type of change
Checklist
yarn test
)yarn lint
). Fix it withyarn lint:fix
in case of failure.yarn lint:types
).