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
{{ message }}
This repository was archived by the owner on Jan 22, 2020. It is now read-only.
Copy file name to clipboardExpand all lines: README.md
+7-7Lines changed: 7 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -76,13 +76,13 @@ The options object can contain properties from [react router's create configurat
76
76
77
77
Additionally, it can contain the following **optional** properties,
78
78
79
-
-`docType`: <String> - a string that can be used as a doctype (_Default: `<!DOCTYPE html>`_).
80
-
(docType might not make sense if you are rendering partials/sub page components, in that case you can pass and empty string as docType)
81
-
-`routesFilePath`: <String> - path for the file that contains the react router routes.
79
+
-`docType`: _String_ - a string that can be used as a doctype (_Default: `<!DOCTYPE html>`_).
80
+
docType might not make sense if you are rendering partials/sub page components, in that case, you should pass an empty string as docType.
81
+
-`routesFilePath`: _String_ - path for the file that contains the react router routes.
82
82
react-engine uses this behind the scenes to reload the routes file in
83
83
cases where [express's app property](http://expressjs.com/api.html#app.set)`view cache` is false, this way you don't need to restart the server every time a change is made in the view files or routes file.
84
-
-`renderOptionsKeysToFilter`: <Array> - an array of keys that need to be filtered out from the data object that gets fed into the react component for rendering. [more info](#data-for-component-rendering)
85
-
-`performanceCollector`: <Function> - to collects [perf stats](#performance-profiling)
84
+
-`renderOptionsKeysToFilter`: _Array_ - an array of keys that need to be filtered out from the data object that gets fed into the react component for rendering. [more info](#data-for-component-rendering)
85
+
-`performanceCollector`: _Function_ - to collects [perf stats](#performance-profiling)
86
86
87
87
###### Rendering views on server side
88
88
```js
@@ -128,9 +128,9 @@ The options object can contain properties from [react router's create configurat
128
128
129
129
Additionally, it can contain the following properties,
130
130
131
-
- `viewResolver` : **required** - <Function> - a function that react-engine needs to resolve the view file.
131
+
- `viewResolver` : **required** - _Function_ - a function that react-engine needs to resolve the view file.
132
132
an example of the viewResolver can be [found here](https://github.com/paypal/react-engine/blob/ecd27b30a9028d3f02b8f8e89d355bb5fc909de9/examples/simple/public/index.js#L29).
133
-
- `mountNode` : **optional** - <HTMLDOMNode> - supply a HTML DOM Node to mount the server rendered component in the case of partial/non-full page rendering.
133
+
- `mountNode` : **optional** - _HTMLDOMNode_ - supply a HTML DOM Node to mount the server rendered component in the case of partial/non-full page rendering.
134
134
135
135
### Data for component rendering
136
136
The actual data that gets fed into the component for rendering is the `renderOptions` object that [express generates](https://github.com/strongloop/express/blob/2f8ac6726fa20ab5b4a05c112c886752868ac8ce/lib/application.js#L535-L588).
0 commit comments