StackOverflow - StackOverflow

PropType is defined but prop is never used - But it is?

You reversed the order of Props and State type parameters that you passed to the Component, so Flow thinks props is State and state is Props. That line should look like this, with Props first followed by State:

export default class MyComponent extends Component<Props, State> {
    // ...
}

Check out the Flow docs on React components for more.

Was this helpful?

Have a different question?

Can't find the answer you're looking for? Submit your own question to our community.

🛎️ Get Weekly OTA Fixes

New answers, vendor issues, and updates — straight to your inbox.