feat: ability to reset useCopyToClipboard hook
Description
Closes #1265 The motivation is explained in #1265.
This is a backwards-compatible change that adds a reset function to the values returned by the useCopyToClipboard hook. When reset is called, the hook is set back to its initial state.
Type of change
- [ ] Bug fix (non-breaking change which fixes an issue)
- [x] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as before)
Checklist
- [x] Read the Contributing Guide
- [x] Perform a code self-review
- [x] Comment the code, particularly in hard-to-understand areas
- [x] Add documentation
- [x] Add hook's story at Storybook
- [x] Cover changes with tests
- [x] Ensure the test suite passes (
yarn test) - [x] Provide 100% tests coverage
- [x] Make sure code lints (
yarn lint). Fix it withyarn lint:fixin case of failure. - [x] Make sure types are fine (
yarn lint:types).
humble bump @xobotyi
@streamich @xobotyi Quarterly reminder to check this PR 😄
@streamich @xobotyi Half-yearly reminder to check this PR? I think it solves an issue not for myself only, see #1265 comments
Per #1265 seems a welcome PR, please merge or close with a reason, thanks @streamich @xobotyi
@bebbi ive quit maintaining this project, sorry. Others stopped any active development long time ago, therefore your pr wont be processed I suppose.
All I can offer to you is consider project of mine with way better code quality and active maintaining https://github.com/react-hookz/web Yet lacking of all hooks that contained in react-use, it is appreciated to receive prs.