You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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. facebook/react#18178 (comment)@markerikson has a comment here. if this usage is not allowed, why is this usage recommended in the document?
The text was updated successfully, but these errors were encountered:
This isn't an ideal pattern, and that example probably should move the dispatch into a layout effect or something. That said, if it's happening in the root of a component tree, I'd also expect that there aren't any components that are subscribed at that point.
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 insideDetail
, 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. facebook/react#18178 (comment) @markerikson has a comment here. if this usage is not allowed, why is this usage recommended in the document?
The text was updated successfully, but these errors were encountered: