使用 Flow 檢查道具型別
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
}
}