primefaces / primefaces/primereact
Hook: useScrollTop target prop
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 8.3k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Hello, I believe that the useScrollTop hook's target parameter supporting React ref in version v11 would be much more suitable for React's architecture.
React ref type:
https://github.com/DefinitelyTyped/DefinitelyTyped/blob/ac1acf965f539e4a9f7ac38bd268675793ded4c1/types/react/index.d.ts#L193
I think it would be more logical to use useref instead of target usestate in the hook's documentation to pass it to the target parameter.
#8253
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with packages/hooks/src/use-scrolltop/index.ts and compare the target prop definition with the React ref type linked in the issue. Review the useScrollTop documentation mentioned in the report and issue #8253 for context. Done means the target accepts the intended React ref shape and the documented usage matches it.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100