DEV Community

Discussion on: Express in React! React Backend! Whut?! 🤯

Collapse
 
okrohan profile image
Rohan Salunke

This is cool! ReactPHP might be a more relevant name thought JK :P

Bdw, What rendering engine did you use?

Collapse
 
devhammed profile image
Hammed Oyedele • Edited

Did you know why you need to use react and react-dom when building React.js projects?

Because React just provides the logic but depends on a renderer to actually output stuff which is where react-dom comes in to render the UI to the browser DOM.

There is a lesser-known package called react-reconciler which is the package react-dom is using and it is what you will use to create your own custom React.js renderers.

Collapse
 
cliffordfajardo profile image
Clifford Fajardo

Good callout @devhammed !

Collapse
 
orkhanjafarovr profile image
Orkhan Jafarov

Yes, that’s exactly as Hammed described. The solution is component based http server and you can pass your regular react dom components and render them. Use useContext hook to get req, res in the components you gonna pass in it