Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
When StrictMode is enabled, and FDT is run under React v19, we run into NPEs in the top-level `<FixedDataTableContainer>` component, causing the table to not function correctly. StrictMode runs the constructor and lifecycle methods twice. The order I observed was as follows: ``` constructor constructor getDerivedStateFromProps getDerivedStateFromProps componentDidMount componentWillUnmount componentDidMount getDerivedStateFromProps getDerivedStateFromProps ``` So when running in StrictMode, the handlers/redux store gets initialized in the constructor, and then immediately gets destroyed in componentWillUnmount, leading the table to be in a destroyed state. I'm fixing this by moving the initialization logic to both the constructor and componentDidMount, following what we did in #657 in the past.
- Loading branch information