feat(Flash): Add render methods that do not dump flash autom

query from the front end app for these messages
This commit is contained in:
Berkeley Martinez
2018-01-09 17:12:58 -08:00
parent 0af881a177
commit 387eafbf33
6 changed files with 27 additions and 27 deletions

View File

@@ -95,8 +95,9 @@ export default function reactSubRouter(app) {
const title = titleSelector(state);
epic.dispose();
res.expose(state, 'data', { isJSON: true });
res.expose(req.flash(), 'flash', { isJSON: true });
res.render('layout-react', { markup, title });
// note(berks): we render without express-flash dumping our messages
// the app will query for these on load
res.renderWithoutFlash('layout-react', { markup, title });
})
.subscribe(() => log('html rendered and sent'), next);
}