diff --git a/api.md b/api.md index 0d371cc..ee764b3 100644 --- a/api.md +++ b/api.md @@ -447,11 +447,10 @@ import { At the moment React context [can not be readily used between two renderers](https://github.com/react-spring/react-three-fiber/issues/43), this is due to a problem within React. If react-dom opens up a provider, you will not be able to consume it within ``. If managing state (like Redux) is your problem, then [zustand](https://github.com/react-spring/zustand) is likely the best solution, otherwise you can solve it by forwarding the context object that you are trying to access: ```jsx -const forwardContext = React.createContext() - function App() { + const value = useContext(context) return ( - - {/* children can now read state from forwardContext */} + + {/* children can now read state from context */} ```