简体   繁体   中英

ReactJS preprocessed index.html

I'm aware that Facebook uses React for developing their front end. I'm a little bit new to ReactJS, and so far I have seen that the server returns the index.html and loads the components on the root div.

Looking at the source code of facebook.com, I realized that the response index.html has some preprocessed data and different scripts. Can anyone tell me how they do for responding with a preprocessed index.html?

You have to render react on the server to enable such functionality. Using a framework like Nextjs would help you achieve this.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM