Using Flow to check prop types
suggest changeArticle and ReactElement must already be in scope. This is the older Flow style of declaring props on the class.
import React, { Component } from 'react';
type Props = {
posts: Array<Article>,
dispatch: Function,
children: ReactElement
}
class Posts extends Component {
props: Props;
render () {
// rest of the code goes here
}
}
Found a mistake? Have a question or improvement idea?
Let me know.
Table Of Contents