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: docs/src/learn/start-a-new-react-project.md
+17-13Lines changed: 17 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,3 @@
1
-
2
1
## Overview
3
2
4
3
<pclass="intro"markdown>
@@ -7,22 +6,21 @@ If you want to build a new app or a new website fully with ReactPy, we recommend
7
6
8
7
</p>
9
8
10
-
11
9
## Built-in Backends
12
10
13
11
<!-- FIXME: This is reliant on https://github.com/reactive-python/reactpy/issues/1071 -->
14
12
15
13
!!! note
16
14
17
-
Some of our frameworks are considered _built-in_, meaning that compatibility for these backends are contained within `reactpy.backend.*`.
15
+
Some of our backend frameworks are considered _built-in_, meaning that compatibility for these backends are contained within `reactpy.backend.*`.
18
16
19
-
In order to run ReactPy with these frameworks, you will need to run `reactpy.backend.*.configure(...)` on your ASGI application. This command will configure the necessary settings and routes for ReactPy to work properly.
17
+
In order to use ReactPy with _built-in_ backend, you will need to run `reactpy.backend.*.configure(...)` on your ASGI application. This command will configure the necessary settings and routes for ReactPy to work properly.
20
18
21
19
For example, this is how you would configure ReactPy for FastAPI:
22
20
23
-
```python linenums="0"
24
-
{% include "../../examples/python/start_a_new_react_project/configure_example.py" %}
25
-
```
21
+
```python linenums="0"
22
+
{% include "../../examples/python/start_a_new_react_project/configure_example.py" %}
23
+
```
26
24
27
25
### FastAPI
28
26
@@ -96,6 +94,12 @@ You will need to [configure Tornado](#built-in-backends) in order to use it with
96
94
97
95
## External Backends
98
96
97
+
!!! warning "Pitfall"
98
+
99
+
_External_ backends have ReactPy support, but have significantly different installation and configuration instructions than _built-in_ backends.
100
+
101
+
Make sure to follow the configuration guide for your chosen _external_ backend.
102
+
99
103
### Django
100
104
101
105
[Django](https://www.djangoproject.com/) is a full-featured web framework that provides a batteries-included approach to web development. It includes features such as ORM, templating, authentication, and authorization. Django is a good choice for large and complex web applications.
@@ -108,7 +112,7 @@ You will need to [configure Tornado](#built-in-backends) in order to use it with
108
112
109
113
If you're new to Django, check out the [Django tutorial](https://docs.djangoproject.com/en/dev/intro/tutorial01/).
110
114
111
-
You will need to [configure Django](https://reactive-python.github.io/reactpy-django/get-started/installation/)in order to use it with ReactPy.
115
+
ReactPy has unique [configuration instructions](https://reactive-python.github.io/reactpy-django/get-started/installation/) to use Django.
112
116
113
117
### Jupyter
114
118
@@ -122,7 +126,7 @@ Jupyter is an interactive computing environment that is used for data science an
122
126
123
127
If you're new to Jupyter, check out the [Jupyter tutorial](https://jupyter.org/try).
124
128
125
-
You will need to [configure Jupyter](https://github.com/reactive-python/reactpy-jupyter#readme)in order to use it with ReactPy.
129
+
ReactPy has unique [configuration instructions](https://github.com/reactive-python/reactpy-jupyter#readme) to use Jupyter.
126
130
127
131
### Plotly Dash
128
132
@@ -136,16 +140,16 @@ Plotly Dash is a web application framework that is used to create interactive da
136
140
137
141
If you're new to Plotly Dash, check out the [Plotly Dash tutorial](https://dash.plotly.com/installation).
138
142
139
-
You will need to [configure Plotly Dash](https://github.com/reactive-python/reactpy-dash#readme)in order to use it with ReactPy.
143
+
ReactPy has unique [configuration instructions](https://github.com/reactive-python/reactpy-dash#readme) to use Plotly Dash.
140
144
141
145
!!! info "Deep Dive"
142
146
143
147
<font size="4">**Can I use ReactPy without a backend framework?**</font>
144
148
145
-
You can not ReactPy without a backend—this project was designed to be built on-top of existing web frameworks.
149
+
You can not ReactPy without a backend—this project was designed to be built on-top of existing web frameworks.
146
150
147
151
Here's why.
148
152
149
153
You can think of ReactPy as ReactJS server side rendering, but with a Python server. We rely on Python web frameworks and webservers in order to process ReactPy traffic. **This means that you can [use any Python web framework](../learn/creating-backends.md) as a ReactPy backend, as long as it supports the ASGI standard.** As your project grows with every new feature, you may want to switch backends in the future. As a result, we recommend keeping all backend-related logic within hook functions in order to make the "points of integration" between ReactPy and your backend as small as possible.
150
-
151
-
**If you're building a new app or a site fully with ReactPy, we recommend using your favorite backend combined with [`reactpy-router`](https://github.com/reactive-python/reactpy-router) to create a Single Page Application (SPA).**
154
+
155
+
**If you're building a new app or a site fully with ReactPy, we recommend using your favorite backend combined with [`reactpy-router`](https://github.com/reactive-python/reactpy-router) to create a Single Page Application (SPA).**
0 commit comments