Integrating Symfony Security and Other Template Utilities with ReactJS

I have a symfony app with the twig template engine. It is very useful to have app.requestboth app.userobjects and utils as is_granted('ROLE_MODER')in the template. Is there a way to handle all this in a js reaction? For example, for routes, I think I could use the FOS JsRouting bundle , but I could not find any way how I could access an app object or provide a function in a js reaction.

+6
source share
1 answer

You can structure your application using HATEOAS:

https://github.com/willdurand/Hateoas

as well as a set of REST

http://symfony.com/doc/current/bundles/FOSRestBundle/index.html

, , symfony Voter/ ACL:

http://symfony.com/doc/current/security/voters.html

.

symfony , . , symfony, .

symfony REST API. ... API. ReactJs , API Symfony.

+2

All Articles