Answer the question
In order to leave comments, you need to log in
What does django + react interaction look like now?
Hello everyone
Now I'm studying react.js, as it is asked everywhere in vacancies. A number of questions arose:
1) Why is react used more often in conjunction with Django?
- insert some interactive elements into the pages?
- do the whole front on it?
- Saw only the admin panel?
2) Is it possible to combine regular pages (which are rendered via view.py/urls.py) with what happens with DRF + react.js + routing?). i.e. let's say part of the site is ordinary pages, and the other part is on react?
3) What is the standard set of packages currently used for this bundle? And then I watch tutorials, do they use different packages all the time?
4) Can search engines index such sites normally, or is everything lost in the abyss?
5) How well do you really need to know react in order to close it in a resume?
Answer the question
In order to leave comments, you need to log in
React communicates with the backend exclusively through the rest api, no matter what service provides the data, be it php, django or nodejs. It is possible to combine, but not necessary, these are different layers of the application architecture as a whole.
1) Why is react used more often in conjunction with Django?
- insert some interactive elements into the pages?too bold - it's easier to do on pure zhs
- do the whole front on it?if there is a frontender and he cuts the front himself
- Saw only the admin panel?it's easier to attach an angular in 10 minutes
2) Is it possible to combine regular pages (which are rendered via view.py/urls.py) with what happens with DRF + react.js + routing?). i.e. let's say part of the site is ordinary pages, and the other part is on react?More likely no than yes
4) Can search engines index such sites normally, or is everything lost in the abyss?search engines see only html. No content in html - search engines don't index anything
5) How well do you really need to know react in order to close it in a resume?rather depends on arrogance.
I agree with comrades davidnum95 and @bioroot
We have flies separately, cutlets separately. DRF - for the backend. Both the mobile application and the React frontend work with it. And the react is going simply to static. No nodejs in production. Requires well-coordinated team work and a clear delineation of responsibilities.
React works through REST, and there is a django rest framework for it . Googling you can find tutorials for this bundle. And I suspect that it will even allow you to make pages both on react and without it without any problems. The main question is why?
In my opinion, now the general trend is towards making a bare rest api instead of a regular site and uploading data through it even to a mobile application, even to a regular computer, at least to some other device that can display this data beautifully. But it is not clear why this should be done in Django. At least at the moment, when the average site does not need such bells and whistles, and for large projects, performance is more important than Django's wrapping capabilities.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question