A small collection of flow type definitions for working with React components
npm install react-flow-types



Most of the types that used to be in this package now have equivalents in flow@0.53, so I'm deprecating them. The most important type that still remains is HigherOrderComponent. If you come up with more useful types for react, feel free to submit a PR :)
```
$ npm install --save-dev react-flow-types
The generic type of a higher-order component. A HigherOrderComponent always provides a set of props to the inner component, and requires another set of props to be passed to it.
Example:
`javascript
import type {HigherOrderComponent} from 'react-flow-types'
type RequiredProps = {
name: string,
}
type ProvidedProps = {
input: {
value: mixed,
onChange: Function,
},
}
// The hoc:
const asField = (): HigherOrderComponent
const FinalComponent = ({name, ...rest}) =>
hoistNonReactStatics(FinalComponent, component)
FinalComponent.displayName =
asField(${component.displayName || component.name || 'Component'})
return FinalComponent
}
const Input = ({input}) =>
const WrapperInput = asField(Input)
const element =
``