When i write functional components and describe prop types as flow it doesn't recognize that. Example below should throw an error because props.some
isn't a string it is actually a number.
// @flow
import React from 'react'
import {compose, withProps} from 'recompose'
const
App = (props: {
some: string
}) => <div className='App'>{props.some}</div>
export default compose(
withProps({
some: 42
})
)(App) //Response => No Errors
In other cases such (e: string) => e; e(42); // => Error
flow-type works fine.
My .flowconfig is only after flow init.
I think the issue here is getting the types for the recompose library. Without that, Flow has no way to know what the type of the wrapping component should be. Have you installed a libdef for recompose?