I'd like to start using React components in Django project. React would be used only for some parts of project (e.g. some filters, search box etc).
I looked to answer in other similar question but it doesn't work for me as I don't want to use python-webpack
and espacially js-host
as it will run additional proccess and is hard to configure and deploy.
Do anyone knows any other good solution how to use React with Django?
So I've put together http://www.noobmovies.com using Django, Django-Rest-Framework and ReactJS. In a nutshell, I described this process in 2 videos I made available on YouTube.
video 1: https://www.youtube.com/watch?v=wU-KUapq1kQ
video 2: https://www.youtube.com/watch?v=6tiaiSr6Pqw
I like to pass essential data to the template in the Django view to render enough data to populate meta tags and things which are needed by search engines when the page is loaded for the first time. I then use the API to grab the rest of the data via REST AJAX calls and use React to render the JSON data into a nice UI. This allows the page to load quickly and get the data via subsequent api calls using React.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With