Using Flow to check prop types of stateless functional components
suggest changetype Props = {
posts: Array<Article>,
dispatch: Function,
children: ReactElement
}
const AppContainer =
({ posts, dispatch, children }: Props) => (
<div className="main-app">
<Header {...{ posts, dispatch }} />
{children}
</div>
)
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents