Figure out the best ways to make React work together with Django
ykdojo opened this issue · comments
I'm starting to think, React might be the best option for this project, partly because it'll make it easier to use React Native later on.
I found a few tutorials on how to make it work with Django:
- https://stackoverflow.com/questions/50295249/what-are-the-options-to-configure-a-reactjs-and-django-application
- https://hackernoon.com/creating-websites-using-react-and-django-rest-framework-b14c066087c7
- https://wsvincent.com/django-rest-framework-react-tutorial/
I guess another option is to use a different backend stack (Node, for example). But I think that would take longer to set up considering the amount of code we already have in Django.
This article might be good, too: https://medium.com/uva-mobile-devhub/set-up-react-in-your-django-project-with-webpack-4fe1f8455396
Okay I think I'm going to try this approach: https://medium.com/uva-mobile-devhub/set-up-react-in-your-django-project-with-webpack-4fe1f8455396
It looks like the Django library mentioned in the article can handle multiple webpack configurations.
References:
https://github.com/owais/django-webpack-loader
https://webpack.js.org/configuration/configuration-types/#exporting-multiple-configurations
https://stackoverflow.com/questions/35903246/how-to-create-multiple-output-paths-in-webpack-config
There are still details to be ironed out, but I think I have a good idea on what general direction to take to make this work. So, I'm going to close this issue for now.