& Amp; lt; -- if you want to know the answer, click the top button on the left. Thank you. I plan to use ReactJS to complete V-layer work, and Laravel to do C and M work. Is this method feasible? Is this necessary? In addition, for example, how to translate blade into ReactJS component code, or...
<-- If you want to know the answer, click the top button on the left. Thank you.
I plan to use ReactJS to complete V-layer work, and Laravel to do C and M work. Is this method feasible? Is this necessary?
In addition, for example, how should blade be translated into the ReactJS component code, or how should I replace Laravel's front-end template with ReactJS:
Do you have any project code for reference? Thanks for sharing
Reply content:
<-- If you want to know the answer, click the top button on the left. Thank you.
I plan to use ReactJS to complete V-layer work, and Laravel to do C and M work. Is this method feasible? Is this necessary?
In addition, for example, how should blade be translated into the ReactJS component code, or how should I replace Laravel's front-end template with ReactJS:
Do you have any project code for reference? Thanks for sharing
First, react. js is generally called instead of ReactJS.
To give full play to the role of react. js, I suggest thoroughly separating the front-end from the back-end and only communicating through JSON. Instead of using Laravel to output front-end code
The front end is used with react-router to create a Web-App for isomorphic. For the specific code and tutorial, refer to my first answer on SF.
The backend only uses the RESTful API related part of Laravel. The main logic is written in the M layer, and almost no code is written in the Controller.
It is inconvenient to use the mobile phone code. If you have time, you can use it again.
Refer to this react-laravel.