import * as React from 'react'; import {RouteComponentProps} from 'react-router'; //eslint-disable-line no-unused-vars import {Link} from 'react-router-dom'; interface Pokemon { id: number; nickname: string; } interface PassedRouteProps { id?: string; } interface State { pokemon: Pokemon; } class PokemonShow extends React.Component, State> { public state = { pokemon: { id: null, nickname: null, }, }; public async componentDidMount(): Promise { try { this.setState({pokemon: {id: 1, nickname: 'Bulbasaur'}}); } catch (err) { // eslint-disable-next-line no-console console.log(JSON.stringify(err, null, 2)); } } public render(): JSX.Element { return ( <> {this.state.pokemon.id}: {this.state.pokemon.nickname}

404 page

); } } export default PokemonShow;