Clarification on useCallback function name on beta docs
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 11.8k
- Forks
- 7.9k
- Avg merge
- 1d 11h
- Merged PRs (30d)
- 11
Description
In the react beta docs, useCallback api reference page gives the following example

I think the constant naming memoizedFn leads to some confusion on what useCallback does.
People tend to assume that useCallback actually memoizes the function but it does not do that. It returns the same instance of the function between re-renders.
An appropriate name of that variable should be originalFn.
I maybe wrong so please let me know if the above makes sense.
Big fan of the beta docs btw ❤️ , beautiful documentation and excellent examples!
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
Open the React beta docs useCallback API reference and inspect the example shown in the issue. Compare the variable name with the surrounding explanation of useCallback, then update the example if maintainers agree that the terminology is confusing and verify the rendered documentation example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, react
- Domain
- documentation
- Issue type
- Documentation
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100