Reactpy under the hood #1017
-
Hello there, I am starting to experiment with ReactPy, and I have a few questions regarding the limitations. How does this work exactly under the hood? From my first understanding, we would have separate routes for each page. Is this the case? And if yes, would we lose the "SPA" aspect of React? Also, does everything happen server-side and is updated using VDOM? I have some trouble understanding what is exactly sent to the client. Thank you very much, and sorry for my lack of understanding. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
You can think of The VDOM representation of the HTML is retained server-side. When this representation changes, it is sent to the client to be rendered by ReactJS (technically Preact). SPA functionality can be obtained by using You can find some more technical details sprinkled around the comment section of our Reddit post. |
Beta Was this translation helpful? Give feedback.
You can think of
reactpy
as ReactJS server side rendering, except with a Python server. In order to keep things moving, we utilize an asyncio loop.The VDOM representation of the HTML is retained server-side. When this representation changes, it is sent to the client to be rendered by ReactJS (technically Preact).
SPA functionality can be obtained by using
reactpy-router
.You can find some more technical details sprinkled around the comment section of our Reddit post.