4π
β
I would use Django REST framework for this. It allows you to create JSON (JavaScript Object Notation) APIs using Django. This means that your Django/ python models now can be interacted with using javascript. Now you can use React to do things like query data in your database (through your Django models) and display it on your frontend.
It also gives the the added bonus of allowing you to use any frontend framework that reads JSON (most of them do). For example, you can now build an iPhone app using another frontend framework and use the same Django API that youβre using with React as its backend. This means you only need to have one backend framework to serve all of your frontend projects.
π€Toms Code
Source:stackexchange.com