If you want to use a state manager with the NextJS 13 App Router please consult this tutorial for best practices.