From 45e98971b658c95a12b3ee1661502810ba3c7b30 Mon Sep 17 00:00:00 2001 From: Cheton Wu Date: Fri, 19 Jan 2018 18:11:37 +0800 Subject: [PATCH] Update README.md --- README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/README.md b/README.md index 005faf9..a78a7fd 100644 --- a/README.md +++ b/README.md @@ -63,6 +63,51 @@ Demo: https://trendmicro-frontend.github.io/react-sidenav ``` +## React Router v4 with React v16 + +```jsx + + ( + + { + const to = '/' + selected; + if (location.pathname !== to) { + history.push(to); + } + }} + > + + + + + + + + Home + + + + + + + + Devices + + + + +
+ } /> + } /> + } /> +
+
+ )} + /> +
+``` + ## API ### Properties