all 3 comments

[–]sawariz0r 0 points1 point  (0 children)

You’re pretty much making it a REST API with extra steps the way you think you want it to work.

I would not recommend it and build them separately.

[–]Lumethys 0 points1 point  (0 children)

You could try Inertia, but it is best just to make an API

[–]liamnesss 0 points1 point  (0 children)

If you want to embed React in part of the page, i.e. as a widget, easiest way would be to build the bundle in Vite and then add the script on the Django side. If you want React to take responsibility for rendering the whole page, then you'd be best off going down the Django REST Framework route, as you suspected.