Django Templates with React
I'm relatively new to the Django world, and I love it for the amount of ready-to-use solutions. The only thi...
For further actions, you may consider blocking this person and/or reporting abuse
Great work thanks. This has really helped with my project.
exactly what I was looking for without extra unecesary libraries or complexity
And then you can manipulate context as a react state? How do you send data to views? Also there is project that integrates react and Django but I forgot it's name
In my setup I just used normal Django flow with forms and POST requests for data updates and React mostly for read-only templates, so once page will be reloaded by POST request, there will be a new data in your hook.
To speed things up, you can either enforce caching policy for JS files, or update state locally and send new data to the API.
You sir, are a genius.
Is there a way to do this as single page. For example when you goes to another page music doesn't get restarted or paused?
Haven't researched into that, maybe you can start with rendering and then transition to PWA, but this way you won't be able to pass data in templates π€·