Skip to content

Commit

Permalink
Upgrade Farce
Browse files Browse the repository at this point in the history
  • Loading branch information
taion committed Nov 29, 2016
1 parent f2f9f04 commit 0fe85e5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,6 @@ The `createBrowserRouter` function takes an options object. The only mandatory p

The options object also accepts a number of optional properties:

- `basename`: a string to implicitly prepend to all paths
- `historyMiddlewares`: an array of Farce history middlewares; by default, an array containing only `queryMiddleware`
- `historyOptions`: additional configuration options for the Farce history store enhancer
- `renderPending`: a custom render function called when some routes are not yet ready to render, due to those routes have unresolved asynchronous dependencies and no route-level `render` method for handling the loading state
Expand Down Expand Up @@ -495,7 +494,7 @@ ReactDOM.render(
);
```

The options object for `createFarceRouter` should have a `historyProtocol` property that has a history protocol object. For example, instead of providing `basename` with `createBrowserRouter`, you would provide `new BrowserProtocol({ basename })`.
The options object for `createFarceRouter` should have a `historyProtocol` property that has a history protocol object. For example, to use the HTML History API as with `createBrowserRouter`, you would provide `new BrowserProtocol()`.

The `createFarceRouter` options object does not have defaults for the `historyMiddlewares` and `render` properties. It ignores the `renderPending`, `renderReady`, and `renderError` properties.

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"homepage": "https://github.com/4Catalyzer/found#readme",
"dependencies": {
"babel-runtime": "^6.18.0",
"farce": "^0.1.0",
"farce": "^0.2.0",
"invariant": "^2.2.1",
"is-promise": "^2.1.0",
"lodash": "^4.16.6",
Expand Down
3 changes: 1 addition & 2 deletions src/createBrowserRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import createRender from './createRender';
import resolveElements from './resolveElements';

export default function createBrowserRouter({
basename,
historyMiddlewares,
render,
renderPending,
Expand All @@ -17,7 +16,7 @@ export default function createBrowserRouter({
}) {
const FarceRouter = createFarceRouter({
...options,
historyProtocol: new BrowserProtocol({ basename }),
historyProtocol: new BrowserProtocol(),
historyMiddlewares: historyMiddlewares || [queryMiddleware],
render: render || createRender({
renderPending, renderReady, renderError,
Expand Down

0 comments on commit 0fe85e5

Please sign in to comment.