-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible to do JSX props autocomplete? #38
Comments
I wish we could do that, but Flow doesn't provide that kind-of information for JSX values. We could get it from flow by a series of requests but it would get too slow and rather unnecessary. Soon you'll have the ability to ctrl+click or option+click on a variable to goto it's declaration so I suppose you won't even need this :) |
Do you mean hyperclick plugin from nuclide or something else? Hyperclick unusable with reimports. // @flow
// My.js
export class My {} // @flow
// a.js
import {My} from './My'
export {My} // @flow
// b.js
import {My} from './a'
const my = new My() // jumping to My is not working |
I didn't mean a hyperclick plugin, I meant a declarations plugin :) and not necessarily a plugin, just support in this package |
Any updates on this? |
Yep! We support JSX props autocomplete now, but to have the autocomplete you have to make Flow understand the signature of the components, for example type Props = {
name: string,
}
const MyComponent = (props: Props) => (
<div>{props.name}</div>
)
<MyComponent na/* suggestions will appear here */ |
nope, it does work for me, used your example above. not that I am using flow |
It's possible to do jsx props autocomplete ?
The text was updated successfully, but these errors were encountered: