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
I updated version of react from 18.2.0 to 19.1.0 (@types/react to 19.1.6, @types/react-dom to 19.1.5).
After the update I received several components with such errors:
Argument of type 'typeof SplitCostDialog' is not assignable to parameter of type 'ComponentType<never>'.
Type 'typeof SplitCostDialog' is not assignable to type 'ComponentClass<never, any>'.
Target signature provides too few arguments. Expected 2 or more, but got 1.
I found the reason. I use context in class constructor.
Not sure how to type it correctly, but this code will work when you run it (though I think you should pass context to super too with super(props, context). @eps1lon do you know how to fix this type error?
I updated version of react from 18.2.0 to 19.1.0 (@types/react to 19.1.6, @types/react-dom to 19.1.5).
After the update I received several components with such errors:
I found the reason. I use context in class constructor.
How can I use context inside a constructor after updating to version 19?
I didn't find the answer in the guide.
The text was updated successfully, but these errors were encountered: