Why does new Vue need to use render in the future? Isn't render used to replace string templates?
人生最曼妙的风景,竟是内心的淡定与从容!
Render can indeed replace string templates. You can use render or template here. Render is highly efficient and template is easy to write, such as the following two forms.
template: '<App/>' --------------------------- render:function (h) { return h(App) },
The purpose of both writing methods is to instantiate an App component under the root element #app.
Render can indeed replace string templates. You can use render or template here. Render is highly efficient and template is easy to write, such as the following two forms.
The purpose of both writing methods is to instantiate an App component under the root element #app.