上QQ阅读APP看书,第一时间看更新
Using Flow within VSC
As we have been doing previously, we'll want to see Flow problems right in VSC. There's a simple solution: just go to Extensions, search for Flow Language Support, and install the package; that's it!
You'll also have to change two settings for VSC:
- Add "flow.useNPMPackagedFlow": true and this will remove the need to do npm run flow at the beginning; the extension will do that on its own
- Add "javascript.validate.enable": false to avoid clashes between Flow's syntax and JS
After that, you will be able to see Flow errors onscreen; see following screenshot for an example:
The VSC Flow extension lets you catch data type errors in real time; however, error messages are not always very clear