Open FezVrasta opened 2 years ago
I think this could be a good opportunity to add TypeScript to the project and rewrite the components to be functional + hooks instead of classes?
I think updating the library would be great especially fixing the contructor/componentWillUnmount
asymmetry.
My only worry is that one consumer of that library is limited to react 16. I'm wondering if we could have a path where with the same code base we can build toward different react versions.
Are they blocked on 16.0 or 16.8+?
Hooks were introduced in 16.8 so we could use that as minimum version?
They are using 16.14+
Ok that's great, there shouldn't be any issue if we decided to convert the library to hooks then
We are trying to upgrade to React 18 but this library doesn't seem to work with it when combined with StrictMode.
The problem resides in the way the data is initialized into the
constructor
calls and then deleted oncomponentWillUnmount
. StrictMode forces the components render twice, and most of the react-vtk-js logic doesn't seem to handle this (it never expects the component to unmount while some of the mount operations are still running).Do you think you could prioritize the work needed to support React 18 + StrictMode?