Skip to content

Instantly share code, notes, and snippets.

@hnry
Created August 17, 2016 05:27
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 hnry/bf96179235e05a44ea8be1e2d9bc1594 to your computer and use it in GitHub Desktop.
Save hnry/bf96179235e05a44ea8be1e2d9bc1594 to your computer and use it in GitHub Desktop.
const home = () => {
return <Some React Component>
}
route.define([
route.get("/home", home)
])
// above code when ran on node.js (server) will server render the react component and send back to browser
// above code when ran on client will mount the react component home returns
// basically want it to be re-usuable on server and client with little modification
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment