Open stevenjmarsh opened 7 years ago
I tested both scenarios. both work. when? why?
type ILocationsMapProps = {
...
};
class LocationsMap extends PureComponent {
// OR
class LocationsMap extends PureComponent<any, ILocationsMapProps, any> {
props: ILocationsMapProps;
...
}
In what cases do you pass types to a react component, i.e.
vs. just setting props in the class
also, go over an appropriate use example for defaultProps
see flow recipes here