From a518f2f7d8f621cfb459173673b45c3400fe5648 Mon Sep 17 00:00:00 2001 From: Jorge Pinna Puissant Date: Wed, 26 Jun 2024 13:27:04 +0200 Subject: [PATCH] [FIX] doc: missing `this` in exemple in the doc --- doc/reference/hooks.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/reference/hooks.md b/doc/reference/hooks.md index 7ea668f1f..3af519096 100644 --- a/doc/reference/hooks.md +++ b/doc/reference/hooks.md @@ -121,7 +121,7 @@ In this example, the component will be able to access the `input` with the `useR ```js class Parent extends Component { - inputRef = useRef("someInput"); + this.inputRef = useRef("someInput"); someMethod() { // here, if component is mounted, refs are active: