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
{{ message }}
This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
Using react with jsx, when props type are provided to a component(stateless or class base) and that component is called somewhere else, flow-for-vscode successfully highlights source component props, but not the caller.
Running flow on terminal both highlights the caller and source.
Consider this example:
// app.jsimportReactfrom'react'typeAppProps={syntax: string,framework: string}exportdefault(props: AppProps)=>{// Highlights/draws AppPropsconst{ syntax, framework }=propsreturn<div>Hello! from {framework} with {syntax}</div>}// index.jsimportReactfrom'react'importReactDOMfrom'react-dom'importAppfrom'./components/app'ReactDOM.render(<Appframework="react"/>,// Does not highlight/drawdocument.getElementById('app'),)// running $ flow// =>8: <Appframework="react"/>,^^^^^^^^^^^^^^^^^^^^^^^^^Reactelement`App`8: exportdefault(props: AppProps)=>{^^^^^^^^property`syntax`.Propertynotfoundin.See: src/components/app.js:88: <Appframework="react"/>,^^^^^^^^^^^^^^^^^^^^^^^^^propsofReactelement`App`
I think it would be better and preferable to highlight caller side, since most of the time problem is initiated on the caller.
The text was updated successfully, but these errors were encountered:
The crux being that the results we get back from flow may need massaging in some sort, because vscode only allows single-site errors. There's more details in the other issues.
Using react with jsx, when props type are provided to a component(stateless or class base) and that component is called somewhere else, flow-for-vscode successfully highlights source component props, but not the caller.
Running
flow
on terminal both highlights the caller and source.Consider this example:
I think it would be better and preferable to highlight caller side, since most of the time problem is initiated on the caller.
The text was updated successfully, but these errors were encountered: