Skip to content

Commit 0fe85e5

Browse files
committed
Upgrade Farce
1 parent f2f9f04 commit 0fe85e5

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

README.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,6 @@ The `createBrowserRouter` function takes an options object. The only mandatory p
445445

446446
The options object also accepts a number of optional properties:
447447

448-
- `basename`: a string to implicitly prepend to all paths
449448
- `historyMiddlewares`: an array of Farce history middlewares; by default, an array containing only `queryMiddleware`
450449
- `historyOptions`: additional configuration options for the Farce history store enhancer
451450
- `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
@@ -495,7 +494,7 @@ ReactDOM.render(
495494
);
496495
```
497496

498-
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 })`.
497+
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()`.
499498

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

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"homepage": "https://github.com/4Catalyzer/found#readme",
3232
"dependencies": {
3333
"babel-runtime": "^6.18.0",
34-
"farce": "^0.1.0",
34+
"farce": "^0.2.0",
3535
"invariant": "^2.2.1",
3636
"is-promise": "^2.1.0",
3737
"lodash": "^4.16.6",

src/createBrowserRouter.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ import createRender from './createRender';
77
import resolveElements from './resolveElements';
88

99
export default function createBrowserRouter({
10-
basename,
1110
historyMiddlewares,
1211
render,
1312
renderPending,
@@ -17,7 +16,7 @@ export default function createBrowserRouter({
1716
}) {
1817
const FarceRouter = createFarceRouter({
1918
...options,
20-
historyProtocol: new BrowserProtocol({ basename }),
19+
historyProtocol: new BrowserProtocol(),
2120
historyMiddlewares: historyMiddlewares || [queryMiddleware],
2221
render: render || createRender({
2322
renderPending, renderReady, renderError,

0 commit comments

Comments
 (0)