Skip to content
This repository was archived by the owner on Jan 22, 2020. It is now read-only.

Commit fb4e0ca

Browse files
committed
bump version and readme updates
1 parent 2df2c8d commit fb4e0ca

File tree

5 files changed

+12
-11
lines changed

5 files changed

+12
-11
lines changed

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## 3.4.1 (May 16 2016)
2+
* add backward compatibility for react-router@1 (https://github.com/paypal/react-engine/pull/159)
3+
14
## 3.4.0 (May 13 2016)
25
* Update deprecated `history` and `RoutingContext` for react-router (https://github.com/paypal/react-engine/pull/155)
36

README.md

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ app.set('view', require('react-engine/lib/expressView'));
7070
```
7171

7272
###### Server options spec
73-
Pass in an optional JavaScript object as options to the react-engine's [server engine create method](#setup-in-an-express-app).
74-
The options object can contain properties from [react router's create configuration object](https://github.com/reactjs/react-router/blob/0.13.x/doc/02%20Top-Level/Router.create.md).
73+
Pass in a JavaScript object as options to the react-engine's [server engine create method](#setup-in-an-express-app).
74+
The options object should contain the mandatory `routes` property with the route definition.
7575

7676
Additionally, it can contain the following **optional** properties,
7777

@@ -126,10 +126,9 @@ var data = client.data();
126126
127127
###### Client options spec
128128
Pass in a JavaScript object as options to the react-engine's client boot function.
129-
The options object can contain properties from [react router's create configuration object](https://github.com/reactjs/react-router/blob/0.13.x/doc/02%20Top-Level/Router.create.md).
130-
131-
Additionally, it can contain the following properties,
129+
It can contain the following properties,
132130
131+
- `routes` : **required** - _Object_ - the route definition file.
133132
- `viewResolver` : **required** - _Function_ - a function that react-engine needs to resolve the view file.
134133
an example of the viewResolver can be [found here](https://github.com/paypal/react-engine/blob/ecd27b30a9028d3f02b8f8e89d355bb5fc909de9/examples/simple/public/index.js#L29).
135134
- `mountNode` : **optional** - _HTMLDOMNode_ - supply a HTML DOM Node to mount the server rendered component in the case of partial/non-full page rendering.
@@ -155,7 +154,7 @@ Note: By default, the following three keys are always filtered out from `renderO
155154
- `_locals`
156155
157156
### Handling redirects and route not found errors on the server side
158-
While using react-router, it matches the url to a component based on the app's defined routes. react-engine captures the redirects and not-found cases that are encountered while trying to run the react-router's [match function on the server side](https://github.com/react/react-router/blob/5590516ec228765cbb176c81fb15fe1d4662e475/docs/guides/advanced/ServerRendering.md).
157+
While using react-router, it matches the url to a component based on the app's defined routes. react-engine captures the redirects and not-found cases that are encountered while trying to run the react-router's [match function on the server side](https://github.com/reactjs/react-router/blob/master/docs/guides/ServerRendering.md).
159158
160159
To handle the above during the lifecycle of a request, add an error type check in your express error middleware. The following are the three types of error that get thrown by react-engine:
161160
@@ -227,7 +226,7 @@ var engine = require('react-engine').server.create({
227226
* [Blog on react-engine](https://www.paypal-engineering.com/2015/04/27/isomorphic-react-apps-with-react-engine/)
228227
229228
### Migration from 2.x to 3.x
230-
While upgrading to 3.x version of react-engine, make sure to follow the [react-router's 1.x upgrade guide](https://github.com/react/react-router/blob/5590516ec228765cbb176c81fb15fe1d4662e475/upgrade-guides/v1.0.0.md) to upgrade react-router related code in your app.
229+
While upgrading to 3.x version of react-engine, make sure to follow the [react-router's 2.x upgrade guide](https://github.com/reactjs/react-router/blob/master/upgrade-guides/v2.0.0.md) to upgrade react-router related code in your app.
231230
Then, add to your express error middleware, react-engine's MATCH_REDIRECT and MATCH_NOT_FOUND checks.
232231
233232
### Migration from 1.x to 2.x

example/public/views/404.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
'use strict';
1717

1818
var React = require('react');
19-
var Layout = require('./layout.jsx');
2019

2120
module.exports = React.createClass({
2221
displayName: '404',

example/public/views/500.jsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616
'use strict';
1717

1818
var React = require('react');
19-
var Layout = require('./layout.jsx');
2019

2120
module.exports = React.createClass({
2221
displayName: '500',

package.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-engine",
3-
"version": "3.4.0",
3+
"version": "3.4.1",
44
"description": "a composite render engine for express apps to render both plain react views and react-router views",
55
"main": "index.js",
66
"scripts": {
@@ -62,7 +62,8 @@
6262
"Jared Halpert <[email protected]>",
6363
"Weng Zhi Ping",
6464
"Vincent Orr <[email protected]>",
65-
"skarflacka"
65+
"skarflacka",
66+
6667
],
6768
"licenses": [
6869
{

0 commit comments

Comments
 (0)