Not compatible with latest Flow (React)
See original GitHub issueThis is a:
- Bug Report
- Feature Request
- Question
- Other
Which concerns:
- flow-runtime
- babel-plugin-flow-runtime
- flow-runtime-validators
- flow-runtime-mobx
- flow-config-parser
- The documentation website
What is the current behaviour?
Flow >=0.53.0 modified how React classes are defined. Instead of 3x type arguments (DefaultProps, Props, State), there are only 2x type arguments (Props, State).
As-is, flow-runtime incorrectly maps Props => DefaultProps
and State => Props
, resulting in incorrect warnings/errors.
https://flow.org/en/docs/react/components/ https://medium.com/flow-type/even-better-support-for-react-in-flow-25b0a3485627
Issue Analytics
- State:
- Created 6 years ago
- Reactions:11
- Comments:5 (1 by maintainers)
Top Results From Across the Web
[flow] statics of React.Component [1] is incompatible ... - GitHub
I did use React.ComponentType<any> . Check the first link in my post. Flow complains at React.ComponentType but not at Class<React.
Read more >Troubleshooting Guide - React Flow
This guide contains warnings and errors that can occur when using React Flow. We are also adding common questions and pitfalls that we...
Read more >Why does Flow report my React component as being ...
Cannot instantiate React.Element because in type argument ElementType: • Either class UploaderInput [1] is incompatible with string [2].
Read more >Static Type Checking - React
Static type checkers like Flow and TypeScript identify certain types of problems before you even run your code. They can also improve developer...
Read more >Supported Browsers and Features | Create React App
By default, the generated project supports all modern browsers. Support for Internet Explorer 9, 10, and 11 requires polyfills. For a set of ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Testing a fix for this here: https://github.com/amilajack/babel-plugin-flow-runtime Installation:
Hello, thanks @amilajack, i’ve applied your patch on a flow-runtime fork for better reading : https://github.com/cbazureau/flow-runtime/commit/8d8fd5b4a34ad0b1b7782fd11fd5d08bd933a015
Linked issue : https://github.com/facebook/flow/issues/5029