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

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy