/* eslint-disable */ import React from 'react'; import Link from 'umi/link'; import withRouter from 'umi/withRouter'; import 'whatwg-fetch'; import guessJSFileFromPath from './guessJSFileFromPath'; import styles from './NotFound.less'; class NotFound extends React.Component { constructor(props) { super(props); this.state = { loading: true, routes: [], }; } componentDidMount() { fetch('/__umiDev/routes') .then(res => res.json()) .then(routes => { this.setState({ loading: false, routes, }); }); } renderRoutes(routes) { return (
There's not a page yet at {location.pathname}
.
Create a React.js component in your pages directory at{' '}
{pagesPath}/{jsFile}
{' '}
{do {
if (hasRoutesInConfig) {
`and configure the route in config file `;
} else {
('');
}
}}
then this page will automatically refresh to show the new page component you created.