Skip to content

React class components not rendering with <React.StrictMode> #3393

Answered by urugator
acataluddi asked this question in Q&A
Discussion options

You must be logged in to vote

Possibly relates to

Stricter Strict Mode: In the future, React will provide a feature that lets components preserve state between unmounts. To prepare for it, React 18 introduces a new development-only check to Strict Mode. React will automatically unmount and remount every component, whenever a component mounts for the first time, restoring the previous state on the second mount. If this breaks your app, consider removing Strict Mode until you can fix the components to be resilient to remounting with existing state.

Source: https://github.com/facebook/react/blob/main/CHANGELOG.md#react-1

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@urugator
Comment options

@acataluddi
Comment options

@urugator
Comment options

Answer selected by kubk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants