From 13545c30ff5d4c755dc8e88a775e8e426803a925 Mon Sep 17 00:00:00 2001 From: Kitsune7X Date: Sat, 24 Jan 2026 05:12:32 +0900 Subject: [PATCH] Update link for types of useState function. --- src/content/9/en/part9d.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/content/9/en/part9d.md b/src/content/9/en/part9d.md index edd72d5e19a..63a2a170841 100644 --- a/src/content/9/en/part9d.md +++ b/src/content/9/en/part9d.md @@ -614,7 +614,7 @@ The type of the returned array is the following: [string, React.Dispatch>] ``` -So the first element, assigned to *newNote* is a string and the second element that we assigned *setNewNote* has a slightly more complex type. We notice that there is a string mentioned there, so we know that it must be the type of a function that sets a valued data. See [here](https://codewithstyle.info/Using-React-useState-hook-with-TypeScript/) if you want to learn more about the types of useState function. +So the first element, assigned to *newNote* is a string and the second element that we assigned *setNewNote* has a slightly more complex type. We notice that there is a string mentioned there, so we know that it must be the type of a function that sets a valued data. See [here](https://web.archive.org/web/20241224052343/https://codewithstyle.info/Using-React-useState-hook-with-TypeScript/) if you want to learn more about the types of useState function. From all this we see that TypeScript has indeed [inferred](https://www.typescriptlang.org/docs/handbook/type-inference.html#handbook-content) the type of the first useState correctly, a state with type string is created.