Closed danielytics closed 3 months ago
Nevermind, it wasn't anything the template was doing or react-router was doing!
It was actually that I was trying to use useUtils
inside a pixi-react Sprite component, but these aren't rendered by react in the normal way, since they use the PIXI api to render (don't end up in the component tree in the react-dev-tools for example) and I assume that's what the actual cause was. So there's nothing that needs to be done on your end, my bad!
Thanks for the great template :smile:
The template opens each of the page using react-router, which appears to cause these components to not be wrapped by SDKProvider. Some hooks such as useUtils therefore don't work inside the pages, as they rely on being inside the SDKProvider, eg when I try to use
useUtils
insideIndexPage
:Is there a way to wrap the pages inside the same SDKProvider context to make this work with react-router pages?