Skip to content

Instantly share code, notes, and snippets.

@egoist
Last active February 17, 2017 06:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save egoist/944e938879029970482b1c5e244f7750 to your computer and use it in GitHub Desktop.
Save egoist/944e938879029970482b1c5e244f7750 to your computer and use it in GitHub Desktop.
Unified way for bootstraping Vue.js app
import {render} from 'vue-dom'
const App = {
template: '<h1>hello world</h1>'
}
render(App, '#app')
// on the server
import {renderToString} from 'vue-dom/server'
renderToString(App)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment