Actually, I want to make a stronger claim. It's currently impossible to use Redux or React Query with Next.js without relying on side effects in render, because that's the only way to hydrate data on the client on the initial render.
Will be writing up an issue about this.
I think code splitting Redux reducers in Next.js is currently impossible without breaking the rule of no side effects in render. All examples and libraries I've seen relies on hacks.
Has anyone seen a correct way to solve this? I argue it can't be done with current APIs.