Experience with PhalconPHP + React + Redux?

Hello,

is anybody here, who has experience with PhalconPHP + React + Redux? I want to load data from a database via ajax etc. And is there a way to combine Volt values with React/Redux?

How can i call a Controller via ajax?

Maybe someone has an little example for me :-)

Thx in advance

Rgds Stefan

Like in all other js frameworks like angular, vue etc. Phalcon is server side, volt too, redux and react are client-side. Also react have server-side rendering i think.



19.7k

Hello Wojciech,

thx for your fast answer.

So have i got to say bye bye to Volt, if i use React to generate templates? I know that Volt is server and React client side -> React can be also rendered by server side, i think with V8.

How have i got to prepare the data from PHP? In Json? And how can i call them?

Rgds Stefan



8.0k

you can spilt frontend and backend , My opinion is you should build react on node.js for frontend and send data via jwt to phalcon backend

node.js + react [ frontend ] <-> json web token for encrypt data <-> Phalcon [ Backend ]

@xeleniumz now that's awkward, isn't it? Why would you have two back-ends? And on top of that another layer of abstraction - JWT. Usually if people go for node.js, they won't even have PHP or anything else on their backend. On the contrary, best use case is to have front-end built on whatever you want / js new framework etc, and to exchange data via JSON API with Phalcon as a back-end, You really don't need node.js then. If you do, go only for it etc.

You don't need nodejs. You can render react templates server sides using php - https://github.com/reactjs/react-php-v8js



8.0k

Thank you so much for introduction , I found this guide on github . https://github.com/enaqx/awesome-react



19.7k

Ok, but what is the best way to change data in a kind of "live feeling"? Like a desktop app? To manipulate data, without loading the page, usually i use jquery with ajax, but i want something new.

@Wojciech how can i implement V8 into Phalcon?