Browse Source

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. "
main
Arshita Kakkar 5 years ago
committed by GitHub
parent
commit
5fc494752c
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      content/docs/hooks-faq.md

2
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}

Loading…
Cancel
Save