Skip to content

Commit

Permalink
docs(New hook PR template): Add section for valid use-case for new ho…
Browse files Browse the repository at this point in the history
…oks and check porting approval

The aim of this change is to reduce the number of cases where a PR for a new hook is submitted, but
the code is rejected, because the hook has no valid use-case or has not been approved for porting
from react-use.

re #33
  • Loading branch information
ArttuOll committed Dec 22, 2022
1 parent 16b5bbd commit 1e0786d
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions .github/PULL_REQUEST_TEMPLATE/new-hook.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,20 @@
## What new hook does?
## Hook description

- Describe the new hook. What does it do?

### Valid use-case for the hook

- How would the hook be used in a real application?

## Checklist

- [ ] Have you read [contribution guideline](../../CONTRIBUTING.md)?
- [ ] Have you read the [contribution guidelines](../../CONTRIBUTING.md)?
- [ ] If you are porting a hook from `react-use`, have you checked #33 and the [migration guide](../../src/__docs__/migrating-from-react-use.story.mdx)
to confirm that the hook has been approved for porting?
- [ ] Does the code have comments in hard-to-understand areas?
- [ ] Is there an existing issue for this PR?
- _link issue here_
- [ ] Have the files been linted and formatted?
- [ ] Have the docs been updated?
- [ ] Have the tests been added to cover new hook?
- [ ] Have you written tests for the new hook?
- [ ] Have you run the tests locally to confirm they pass?

0 comments on commit 1e0786d

Please sign in to comment.