Commit Graph
4 Commits
Author SHA1 Message Date
Renée Kooi 6bee7086bc Use new mount() functionality in example (#630)
No more mucking around with `module.parent` ✌️
2018-02-23 19:39:28 +01:00
Renée Kooi 8937832d5f 6.8.0 2018-02-14 12:52:44 +01:00
Renée Kooi a23dc51397 server: Store mount selector and return this (#625)
* Store mount selector and return `this`

This allows `.mount('body')` to be used on the server like so:

```js
module.exports = app.mount('body')
```

Then, when server rendering you can do:

```js
var app = require('./app')
fillServerTemplate(html, app.selector, app.toString('/'))
```

Where `fillServerTemplate` is a function that replaces the HTML at a
CSS selector with some string.

This way you do not need to check for `typeof window` in your
application entry point to do server rendering, and it allows tools like
bankai to automatically inline server rendered html in the correct place.

* docs

* better words
2018-02-13 22:09:08 +01:00
Renée Kooi 2576e2d9ed update repo url (#594) 2017-10-31 12:36:06 +01:00