You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var createBrowserHistory =require('history/lib/createBrowserHistory')
23
+
24
+
consthistory=createBrowserHistory()
25
+
```
26
+
27
+
Then pass them into your `<Router>`:
28
+
29
+
```js
30
+
render(
31
+
<Router history={history} routes={routes} />,
32
+
document.getElementById('app')
33
+
)
23
34
```
24
35
25
36
### `createHashHistory`
@@ -36,7 +47,7 @@ The DOM API that hash history uses to transition around is simply `window.locati
36
47
You can disable that feature (more [here](http://rackt.org/history/stable/HashHistoryCaveats.html)):
37
48
```js
38
49
// Opt-out of persistent state, not recommended.
39
-
let history =createHistory({
50
+
let history =createHashHistory({
40
51
queryKey:false
41
52
});
42
53
```
@@ -89,7 +100,12 @@ You might wonder why we don't fall back to hash history; the problem is that URL
89
100
### `createMemoryHistory`
90
101
Memory history doesn't manipulate or read from the address bar. This is how we implement server rendering. It's also useful for testing and other rendering environments (like React Native).
91
102
103
+
92
104
## Example implementation
105
+
106
+
Putting this all together, if we wanted to use the HTML5 history API for our
0 commit comments