redux-toolkit
redux-toolkit copied to clipboard
Per-route state issue
https://redux-toolkit.js.org/usage/nextjs#per-route-state In my nextjs project I need to reset a value in SPA navigation, this is the suggested solution, but this solution
Warning: Cannot update a component (Page) while rendering a different component (Detail). To locate the bad setState() call inside Detail, follow the stack trace as described in https://reactjs.org/link/setstate-in-render ```
when I did a little research, this usage was allowed before, but now it is not. https://github.com/facebook/react/issues/18178#issuecomment-596875175 @markerikson has a comment here. if this usage is not allowed, why is this usage recommended in the document?