A design question about Laravel and ReactJS

Source: Internet
Author: User
& 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.