Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
Mårten Wikström committed Feb 20, 2018
1 parent bbe2def commit 144bb13
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ Then create an App History object in your code like this:
```js
import { createAppHistory } from "app-history";
const history = createAppHistory();
await history.init();
```

Use it with [`react-router`][react-router] something like this:
Expand All @@ -34,6 +35,7 @@ import { App } from "./App"; // Your app root component

// Create App History object (extending Browser History)
const history = createAppHistory();
await history.init();

// Create a <div> that will host the App component
const root = document.createElement("div");
Expand Down Expand Up @@ -65,6 +67,9 @@ Then create an App History object in your code like this:

```js
const history = AppHistory.createAppHistory({ provider: History });
history.init().then(function () {
// do stuff
});
```

## Usage
Expand Down

0 comments on commit 144bb13

Please sign in to comment.