Skip to content

[Typo]: explanation of useMemo first-render return value, doesn't make logical sense #7752

Open
@alin-sofianu

Description

@alin-sofianu

Summary

Inconsistent explaining on what useMemo returns on first render.

Page

https://react.dev/reference/react/useMemo#reference

Details

From article, in order:

On the initial render, useMemo returns the result of calling calculateValue with no arguments.

On the initial render, the value you’ll get from useMemo will be the result of calling your calculation.

The first sentence, to me does not make sense, as calculateValue is called with arguments, it's just that dependencies don't factor in yet on first render.
Or my bad sorry:)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions