Created
September 7, 2017 00:10
-
-
Save keithnorm/bbad556f422184f9f7ed8ad03fb67c10 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { renderToStaticMarkup } from 'react-dom/server'; | |
app.get('*', (req, res) => { | |
res.status(200).render('layout', { | |
locals: { | |
body: renderToStaticMarkup(<TodoApp/>), | |
} | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment