Skip to content
This repository was archived by the owner on Oct 26, 2018. It is now read-only.

Commit 198e719

Browse files
committed
Migrate the basic example to the new API
1 parent ad9c8a2 commit 198e719

File tree

1 file changed

+4
-4
lines changed
  • examples/basic/components

1 file changed

+4
-4
lines changed

examples/basic/components/App.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
const React = require('react');
22
const { Link } = require('react-router');
33
const { connect } = require('react-redux');
4-
const { updatePath } = require('redux-simple-router');
4+
const { replacePath } = require('redux-simple-router');
55

6-
function App({ updatePath, children }) {
6+
function App({ replacePath, children }) {
77
return (
88
<div>
99
<header>
@@ -16,7 +16,7 @@ function App({ updatePath, children }) {
1616
<Link to="/bar">Bar</Link>
1717
</header>
1818
<div>
19-
<button onClick={() => updatePath('/foo')}>Go to /foo</button>
19+
<button onClick={() => replacePath('/foo')}>Go to /foo</button>
2020
</div>
2121
<div style={{marginTop: '1.5em'}}>{children}</div>
2222
</div>
@@ -25,5 +25,5 @@ function App({ updatePath, children }) {
2525

2626
module.exports = connect(
2727
null,
28-
{ updatePath }
28+
{ replacePath }
2929
)(App);

0 commit comments

Comments
 (0)