We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
React 18 replaces render with createRoot and root.render. (how to upgrade)
render
createRoot
root.render
Is there a plan to update django-react-templatetags to support React 18?
The text was updated successfully, but these errors were encountered:
Hi @matttk! Yes for sure, we just need to find the time to do some proper maintenance :)
For now, the best approach is to override the template https://github.com/Frojd/django-react-templatetags/blob/main/django_react_templatetags/templates/react_print.html
I'm renaming this issue and will have it on top of our todo list when we find the time.
Sorry, something went wrong.
for reference: i'm using this snippet right now (without hydration)
{% if components %} {% for component in components %} {{ component.json_obj|json_script:component.data_identifier }} <script> const container = document.getElementById('{{ component.identifier }}'); const root = ReactDOMClient.createRoot(container); root.render( React.createElement({{ component.name }}, JSON.parse(document.getElementById("{{ component.data_identifier }}").textContent)), ); </script> {% endfor %} {% endif %}
with these imports
import React from "react"; import ReactDOMClient from "react-dom/client";
como se integra django-react-templateta a react 18?
No branches or pull requests
React 18 replaces
render
withcreateRoot
androot.render
. (how to upgrade)Is there a plan to update django-react-templatetags to support React 18?
The text was updated successfully, but these errors were encountered: