javascript - I don't quite understand about render in vue.js
黄舟
黄舟 2017-05-31 10:38:22
0
1
871


Why does new Vue need to use render in the future? Isn't render used to replace string templates?

黄舟
黄舟

人生最曼妙的风景,竟是内心的淡定与从容!

reply all(1)
过去多啦不再A梦

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.

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template