Skip to content

[Suggestion]: Make better use of ref in the last challenge of the docs #7236

@Spoof14

Description

@Spoof14

Summary

Remove useless useState and simply use ref

Page

No response

Details

The docs in the 4th challenge suggest using both a useState and a ref for managing the value of a component when there is a delay. This is unnecesarry and we can simply use the ref.
https://react.dev/learn/referencing-values-with-refs#challenges

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