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
Copy file name to clipboardExpand all lines: README.md
+15-10Lines changed: 15 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,6 +19,8 @@ rendered = render_component(
19
19
print(rendered)
20
20
```
21
21
22
+
For client-side side integrations, refer to the [docs](#using-react-on-the-front-end).
23
+
22
24
23
25
Documentation
24
26
-------------
@@ -87,28 +89,31 @@ Using React on the front-end
87
89
There are plenty of solutions for integrating React into the frontend of a Python system, each with upsides
88
90
and downsides.
89
91
90
-
[Webpack](https://webpack.github.io) is currently the recommended build tool for frontend projects. It can
91
-
compile your files into browser-executable code and provides a variety of tools and processes which can
92
-
simplify complicated workflows.
93
-
94
-
[Browserify](http://browserify.org/) is another popular tool, which has a lot of cross-over with webpack. It
95
-
is argurably the easiest of the two to use, but it tends to lag behind webpack in certain functionalities.
92
+
-[Webpack](https://webpack.github.io) is currently the recommended build tool for frontend projects. It can
93
+
compile your files into browser-executable code and provides a variety of tools and processes which can
94
+
simplify complicated workflows.
95
+
-[Browserify](http://browserify.org/) is another popular tool, which has a lot of cross-over with webpack. It
96
+
is argurably the easiest of the two to use, but it tends to lag behind webpack in certain functionalities.
96
97
97
98
For React projects, you'll find that webpack is the usual recommendation - hot module replacement,
98
99
code-splitting, and a wealth of loaders are the features typically cited.
99
100
[react-hot-loader](https://github.com/gaearon/react-hot-loader) is a particularly useful tool as it allows
100
101
changes to your components to be streamed live into your browser.
101
102
102
-
With regards to integrating webpack into a python system, there are two solutions currently available:
103
+
There are two solutions currently available to integrate webpack into a python system:
103
104
104
105
-[django-webpack-loader](https://github.com/owais/django-webpack-loader) integrates webpack's output into
105
106
your project by leveraging a webpack plugin that generates a file for your python process to consume.
106
107
-[python-webpack](https://github.com/markfinger/python-webpack) integrates webpack's output by talking to
107
108
a build server that wraps around webpack.
108
109
109
-
Both projects can perform the same task of integrating webpack's output. django-webpack-loader's simpler to
110
-
reason about, it aims to do one thing and do it well. python-webpack's more complex, but offers more features
111
-
and can make integrations easier by allowing you to send data from your python process.
110
+
Both projects can perform the same task of integrating webpack's output. django-webpack-loader is simpler to
111
+
reason about, it aims to do one thing and do it well. python-webpack's more complex, but offers more features.
112
+
113
+
Note: older versions of this library used to provide tools for integrating React into your frontend. While
114
+
those tools tended to provide some conveniences, they also overly complicated deployments, limited the
115
+
functionalities that you could apply, and locked you in to a limited workflow which was contrary to React's
116
+
best practices. If you want to persist with the worflow previously offered, the [self-mounting components example](examples) illustrates the functionality.
0 commit comments