mirror of
https://github.com/reactjs/react.dev.git
synced 2026-02-24 04:33:10 +00:00
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. "
This commit is contained in:
@@ -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}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user