Skip to content

Instantly share code, notes, and snippets.

@Gguigre
Created January 16, 2019 21:08
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gguigre/bb56dbffac54d34c2e2d4680048f7536 to your computer and use it in GitHub Desktop.
Save Gguigre/bb56dbffac54d34c2e2d4680048f7536 to your computer and use it in GitHub Desktop.
Sunshine complete ForecastItem component
type PropsType = {
forecast: ForecastType,
index: number
};
export class ForecastItem extends Component<PropsType, StateType> {
render() {
const { forecast, index } = this.props;
const image = getImageFromWeatherType(forecast.weatherType);
return (
<TransitionView style={styles.container} index={0}>
// ...
</TransitionView>
);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment