From d2132cdf9c8b6e96f8d654e812cb7f9819ef5985 Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sat, 23 Feb 2019 11:28:00 +0000 Subject: [PATCH 1/2] Revert "Small typo fix" --- content/docs/hooks-faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/hooks-faq.md b/content/docs/hooks-faq.md index ea862cbced2..25e00c2ef2f 100644 --- a/content/docs/hooks-faq.md +++ b/content/docs/hooks-faq.md @@ -192,7 +192,7 @@ There are a few more heuristics, and they might change over time as we fine-tune ### How do lifecycle methods correspond to Hooks? {#how-do-lifecycle-methods-correspond-to-hooks} -* `constructor`: Function components don't need a constructor. You can initialize the state in the [`useState`](/docs/hooks-reference.html#usestate) call. If computing is expensive, you can pass a function to `useState`. +* `constructor`: Function components don't need a constructor. You can initialize the state in the [`useState`](/docs/hooks-reference.html#usestate) call. If computing it is expensive, you can pass a function to `useState`. * `getDerivedStateFromProps`: Schedule an update [while rendering](#how-do-i-implement-getderivedstatefromprops) instead. From 962df587043388f17ec5b9ab74be21f5bc11ba2d Mon Sep 17 00:00:00 2001 From: Dan Abramov Date: Sat, 23 Feb 2019 11:29:31 +0000 Subject: [PATCH 2/2] Update hooks-faq.md --- content/docs/hooks-faq.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/docs/hooks-faq.md b/content/docs/hooks-faq.md index 25e00c2ef2f..b3b99de9021 100644 --- a/content/docs/hooks-faq.md +++ b/content/docs/hooks-faq.md @@ -192,7 +192,7 @@ There are a few more heuristics, and they might change over time as we fine-tune ### How do lifecycle methods correspond to Hooks? {#how-do-lifecycle-methods-correspond-to-hooks} -* `constructor`: Function components don't need a constructor. You can initialize the state in the [`useState`](/docs/hooks-reference.html#usestate) call. If computing it is expensive, you can pass a function to `useState`. +* `constructor`: Function components don't need a constructor. You can initialize the state in the [`useState`](/docs/hooks-reference.html#usestate) call. If computing the initial state is expensive, you can pass a function to `useState`. * `getDerivedStateFromProps`: Schedule an update [while rendering](#how-do-i-implement-getderivedstatefromprops) instead.