Home > Backend Development > PHP Tutorial > javascript - How to build a website with webpack+react+PHP?

javascript - How to build a website with webpack+react+PHP?

WBOY
Release: 2016-08-20 09:04:05
Original
1268 people have browsed it

Usually when PHP builds the backend, the data interface is embedded in the web page, while webpack+react usually generates an html and a bundle, so how do the two come together?

Reply content:

Usually when PHP builds the backend, the data interface is embedded in the web page, while webpack+react usually generates an html and a bundle, so how do the two come together?

Webpack generates a .js file after packaging. Use <script></script> to directly introduce this file into the HTML page. PHP is only used to send HTML.

PHP only needs to provide JSON data, and everything else is written in ReactJS

Except that PHP returns json data, everything else is the same as above

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template