Closed Archmonger closed 12 months ago
@rmorshea BTW after a lot of testing, the most rational approach for this was to prerender in a separate div, then replace it with the actual render when possible. The prerendering step is performed entirely by the template tag.
Saves us from cross-process rehydration headaches, and is the most compatible solution across multiple backends.
By submitting this pull request you agree that all contributions to this project are made under the MIT license.
Description
vdom_to_html
, then loads the actual component in the background within ahidden
div. When loaded, the prerender is replaced with the actual render.settings.py:REACTPY_PRERENDER
can be set toTrue
to enable this behavior by default{% component "..." prerender="True" %}
reactpy_django.utils.ComponentPreloader
toreactpy_django.utils.RootComponentFinder
.pip install -e .
on Windows.Checklist:
Please update this checklist as you complete each item: