fixed-data-table-2 icon indicating copy to clipboard operation
fixed-data-table-2 copied to clipboard

TypeError: Cannot read properties of null (reading 'getState') in React v.19.0.0

Open av-k opened this issue 2 months ago • 6 comments

During running app on React.js v.19.0.0 in development mode and using React.StrictMode I get the next error:

TypeError: Cannot read properties of null (reading 'getState')

it happens during unmounting and mounting a component that uses:

import {Table, Column} from 'fixed-data-table-2';

Expected Behavior

There are no errors.

Current Behavior

There is an syntax error.

Possible Solution

The broken place is here: https://github.com/schrodinger/fixed-data-table-2/blob/23614b4b7509e6dfedae574aaa8edf3c65567a42/src/FixedDataTableContainer.js#L108 The cause of this issue is here: https://github.com/schrodinger/fixed-data-table-2/blob/23614b4b7509e6dfedae574aaa8edf3c65567a42/src/FixedDataTableContainer.js#L91

Steps to Reproduce

  1. Run app with React v.19.0.0 in development mode with wrapper:

<React.StrictMode> {...} </React.StrictMode>

  1. Use any custom component which uses Table element from 'fixed-data-table-2'.

Your Environment

  • Version used: 2.0.17
  • Browser Name and version: Chrome Version 131.0.6778.85 (Official Build) (64-bit)
  • Operating System and version (desktop or mobile): Fedora 6.11.9-100.fc39.x86_64

av-k avatar Dec 13 '24 12:12 av-k