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
Argument of type 'typeof MyComponent' is not assignable to parameter of type 'typeof Component'.
Type 'MyComponent' is not assignable to type 'Component<P, S>'.
Types of property 'setState' are incompatible.
Type '{ <K extends never>(f: (prevState: {}, props: {}) => Pick<{}, K>, callback?: (() => any) | undefi...' is not assignable to type '{ <K extends keyof S>(f: (prevState: S, props: P) => Pick<S, K>, callback?: (() => any) | undefin...'.
Types of parameters 'f' and 'f' are incompatible.
Types of parameters 'prevState' and 'prevState' are incompatible.
Type '{}' is not assignable to type 'S'.
And what about for stateless functions? IE I don't want "a type of subclasses of React.Component", I want "something that will be rendered correctly with React.createElement".
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
Activity
mikew commentedon Oct 4, 2017
And what about for stateless functions? IE I don't want "a type of subclasses of React.Component", I want "something that will be rendered correctly with React.createElement".
mhegazy commentedon Oct 4, 2017
why not:
mhegazy commentedon Oct 19, 2017
Automatically closing this issue for housekeeping purposes. The issue labels indicate that it is unactionable at the moment or has already been addressed.
samuelneff commentedon Mar 11, 2018
Not sure if this was applicable when originally asked, but now you can do this: