0
私はリアクションサーバを使用してネストされたルーティングを実行しようとしています。しかし、私は反応するコード未定義のプロパティ 'props'を読み取ることができません - リアクタのルータ
const App =() => {
return (
<div>
<h2>{'Nested Routing App'}</h2>
<ul>
<li>
<Link to="/view1">{'View1'}</Link>
</li>
</ul>
{this.props.children}
</div>
);
};
const View1 =() => {
return(
<h3>{'Welcome to View1'}</h3>
);
};
render(
<Router>
<Route component={App} path="/">
<Route component={View1} path="/view1"></Route>
</Route>
</Router>,
document.getElementById('app'));
間違っているかもしれないものを任意のアイデアここで
Uncaught TypeError: Cannot read property 'props' of undefined
を述べブラウザコンソールでエラーが発生している取得していますか?