<> What is server-side rendering ?

Simple understanding can be : Front and rear end not separated ,
advantage : Good page performance , advantageous to seo,
shortcoming : Front and rear end not separated , Difficult data maintenance

<> What is front-end rendering ?

Front end rendering is to take advantage of ajax Get back-end data , Front end page structure detached from server , No server return required HTML,css,js etc .
advantage : Clear structure , attend to each one 's own duties
shortcoming ,: Page load speed depends on JS Loading speed of ( Comparison with server-side rendering )

<>node Isomorphic direct out rendering scheme :

Famous Node, It's also JS. Current backend uses js write , Data can be realized , assembly , There are also some methods that are common at the front and back , World peace , sing and dance to extol the good times .
How to share front and back content ?
data sharing : For the same virtual front and back dom, Server use renderToNodeStream
, Return the result as a stream , So you don't have to wait html Render all to show the results to the client ,. meanwhile , On the browser side , use hydrate Make virtual dom Render as real DOM
element . If the browser side compares with the number of components rendered by the server side , In case of inconsistency , Don't throw away everything , It's a partial rendering . So in the rendering process using the server , To ensure the consistency of front-end and rear component data . Here, the data requested by the server will be , Insert into
js In the global variable of , along with html Render to browser side together ( dehydration ); This is on the browser side , You can get the dehydration data to initialize the components , Add interaction, etc ( water flooding ).

©2019-2020 Toolsou All rights reserved,
It's unexpected Python Cherry tree (turtle The gorgeous style of Library )Unity3D of UGUI Basics -- Three modes of canvas os Simple use of module computer network --- Basic concepts of computer network ( agreement , system )html Writing about cherry trees , Writing about cherry trees Some East 14 Pay change 16 salary , Sincerity or routine ?Unity-Demo Examples ✨ realization UI- Backpack equipment drag function 06【 Interpretation according to the frame 】 Data range filtering -- awesome java Four functional interfaces ( a key , simple )