I use actix-web on the backend and react on the frontend.
I once envisaged to render react components in rust to achieve features similar to next.js and nuxt.js.
This means that I need to call react code in rust to achieve component rendering and data fetch. But I don't know how to implement it.
I found an example: actix-web-cra-ssr. But it only implements very simple features. It does not render react components and data fetch in rust.
I look forward to implementing react ssr in rust, which will bring great changes to the web.
This means that I need to call react code in rust to achieve component rendering and data fetch. But I don't know how to implement it.
That needs a JS engine. If you use a raw JS engine like Spidermonkey or V8 you will have to re-implement a lot of the interfaces with the outside world. It is a lot easier to just use node.js.