0 votes
in React Hooks by
Do two components using the same Hook share state?

1 Answer

0 votes
by

No. Custom Hooks are a mechanism to reuse stateful logic (such as setting up a subscription and remembering the current value), but every time you use a custom Hook, all state and effects inside of it are fully isolated.

...