set and render page title

note this requires changes to thundercats to work
see: thundercatsjs/thundercats-react/issues/3
This commit is contained in:
Berkeley Martinez
2015-07-29 10:16:48 -07:00
parent 549ab1bd0e
commit c82b2e3ae6
7 changed files with 46 additions and 7 deletions

View File

@@ -51,9 +51,13 @@ export default function reactSubRouter(app) {
// makes sure we only get one onNext and closes subscription
.flatMap(function({ data, markup }) {
debug('react rendered');
const { title } = data.AppStore;
res.expose(data, 'data');
// now render jade file with markup injected from react
return res.render$('layout-react', { markup: markup });
return res.render$(
'layout-react',
{ markup, title }
);
})
.subscribe(
function(markup) {