From 5fc494752c8a32f56fd5a2ae37a548486cd5d853 Mon Sep 17 00:00:00 2001 From: Arshita Kakkar Date: Mon, 9 Mar 2020 19:05:18 +0530 Subject: [PATCH] Doc error (#2301) Changed Line 94- You can't use Hooks *inside* of a class component, but you can definitely mix classes and function components with Hooks in a single tree. to "You can't use Hooks *inside* a class component, but you can definitely mix classes and function components with Hooks in a single tree. " --- 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 2f9e2203..b7448c7a 100644 --- a/content/docs/hooks-faq.md +++ b/content/docs/hooks-faq.md @@ -91,7 +91,7 @@ Hooks do have a learning curve of their own. If there's something missing in thi When you're ready, we'd encourage you to start trying Hooks in new components you write. Make sure everyone on your team is on board with using them and familiar with this documentation. We don't recommend rewriting your existing classes to Hooks unless you planned to rewrite them anyway (e.g. to fix bugs). -You can't use Hooks *inside* of a class component, but you can definitely mix classes and function components with Hooks in a single tree. Whether a component is a class or a function that uses Hooks is an implementation detail of that component. In the longer term, we expect Hooks to be the primary way people write React components. +You can't use Hooks *inside* a class component, but you can definitely mix classes and function components with Hooks in a single tree. Whether a component is a class or a function that uses Hooks is an implementation detail of that component. In the longer term, we expect Hooks to be the primary way people write React components. ### Do Hooks cover all use cases for classes? {#do-hooks-cover-all-use-cases-for-classes}