Skip to content
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

Example for flow in docs is incorrect? #3213

Closed
juhaelee opened this issue Jul 19, 2017 · 5 comments
Closed

Example for flow in docs is incorrect? #3213

juhaelee opened this issue Jul 19, 2017 · 5 comments

Comments

@juhaelee
Copy link

juhaelee commented Jul 19, 2017

For the FieldProps example, it looks like the flow type FieldProps is trying to demonstrate typing the props that get passed into the wrapped component, and not the Field itself. I couldn't find a flow type that exposed the FieldPassedProps (input & meta).

Currently looking into the code it looks like FieldProps is:

export type Props = {
  names: string[],
  component: Function | ReactClass<*>,
  format?: (value: any, name: string) => ?any,
  parse?: (value: any, name: string) => ?any,
  props?: Object,
  withRef?: boolean
}

when in the example its looking for something like...

type FieldPassedProps = {
   input: ...
   meta: ...
}
@rezanouri87
Copy link

rezanouri87 commented Jul 20, 2017

Hey @juhaelee ,

I have the same problem. Have you found any solution for this?

@juhaelee
Copy link
Author

i believe the FieldPassedProps needs to be exported from the library. Currently I just typed them myself

@juhaelee
Copy link
Author

Looks like this was mentioned here: #3214

@erikras
Copy link
Member

erikras commented Jul 24, 2017

Published fix in v7.0.2.

@lock
Copy link

lock bot commented Jul 24, 2018

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Jul 24, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants