4 ms·
Yes, with Context. You will need to wrap part of the tree with that Context's Provider, and then you can consume the context value with React.useContext inside
by frosted-flakes 5y ago
Yes, with Context. You will need to wrap part of the tree with that Context's Provider, and then you can consume the context value with React.useContext inside a component. Your custom hook can also use this.