@@ -80,25 +80,25 @@ on the server and send the markup down on the initial request for faster page lo
80
80
and to allow search engines to crawl your pages for SEO purposes.
81
81
82
82
Returns a ` RenderedComponent ` instance, which can be passed directly into templates
83
- to output the component's HTML.
83
+ to output the component's HTML and to mount the component for client-side interactivity .
84
84
85
85
Arguments:
86
86
87
- - ** path_to_source** — a path to a JS or JSX file which exports the component. If the
88
- path is relative, django's static file finders will be used to find the file.
87
+ - ** path_to_source** — a path to a file which exports the component. If the path is relative,
88
+ django's static file finders will be used to find the file.
89
89
- ** props** * optional* — a dictonary that will be serialised to JSON and passed to
90
90
the component during the renderering process.
91
91
- ** to_static_markup** * optional* — a boolean indicating that React's ` renderToStaticMarkup `
92
- method should be used for the rendering. Defaults to ` False ` , which causes React's
93
- ` renderToString ` method to be used.
92
+ method should be used, rather than ` renderToString ` .
94
93
- ** bundle** * optional* - a boolean indicating that the component should be bundled for
95
94
reuse on the client-side. If ` translate ` or ` watch_source ` are used, this argument is
96
95
ignored.
97
96
- ** translate** * optional* - a boolean indicating that the component should be translated
98
97
from JSX and ES6/7 before rendering. Components are translated with
99
98
[ Babel] ( http://babeljs.io ) .
100
- - ** watch_source** * optional* — a boolean indicating that the renderer should watch your source
101
- files and rebuild the component whenever it changes. If not defined, defaults to ` DEBUG ` .
99
+ - ** watch_source** * optional* — a boolean indicating that your source files should be watched
100
+ for changes. When changes are detected, the component is rebuilt in background, ready for
101
+ the next request. If not defined, defaults to ` django.conf.settings.DEBUG ` .
102
102
- ** json_encoder** * optional* — a class which is used to encode the props to JSON. Defaults
103
103
to ` django.core.serializers.json.DjangoJSONEncoder ` .
104
104
0 commit comments