Tutorial by Examples

type Props = { posts: Array<Article>, dispatch: Function, children: ReactElement } const AppContainer = ({ posts, dispatch, children }: Props) => ( <div className="main-app"> <Header {...{ posts, dispatch }} /> {children} </...
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 } }

Page 1 of 1