reactjs / reactjs/react.dev

could team suggest 3rd party hook library for timers right in the official docs?

Open
#2,967 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
11.8k
Forks
7.9k
Avg merge
1d 11h
Merged PRs (30d)
11

Description

What?

Proposal is to recommend(include reference into official docs) some 3rd party hook library that provides wrapper around setTimeout, setInterval or both.

Why?

Because without out-of-the-box solution people reinvent the wheel again and again.

Value

I'd say it would mean better consistency across the projects.

To my mind, it's really challenging to make a hook that a) would be generic/flexible enough; b) still keep code readable; c) would not introduce much boilerplace. So I guess it may be a reason why there are no official useTimeout hook.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the official documentation sections covering hooks and timer APIs such as setTimeout and setInterval. Evaluate suitable third-party libraries, then propose a recommendation with a reference and explain its scope and trade-offs; the issue does not identify a target file, test, or specific library.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
documentation
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.