On idea could be serializing the context and setting as in a global `var` in javascript code in the templates. Then you should be able to access those in from React code.
But tbh, I would not recommend that. This type of integration may create unnecessary complexities.
Better to work with the API workflow.
On Sunday, August 2, 2020 at 11:02:10 PM UTC+6, jose ivan perez diaz wrote:
Hi Everyone,
Where can I found a guide to combine django and React? I mean, what I want is passing the context to a React component, any clue?, I know that is possible combine them throw django rest framework through an API, but is it possible work with the context from django in React, thaks for your help.
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b5113d31-9279-4670-a731-071633ff0cf2o%40googlegroups.com.
No comments:
Post a Comment