Boilerplate for isomorphic web app with React server-side rendering in TypeScript.
npm install react-server-example-tsx





A complex example of how to do server-side rendering with
React and TypeScript so that component code can be shared between server and browser (also known as isomorphic javascript).
Server-Side Rendering (SSR) leads to fast initial page loads, search-engine-friendly pages, and of course...its all type safe!
Clone the repo, change directory, install dependencies, build the code, and run it!
``sh`
git clone https://github.com/styfle/react-server-example-tsx.git
cd react-server-example-tsx
npm install
npm run build
npm run test
npm start
Then navigate to http://localhost:3007 and click on the buttons to see some reactive events in action.
Don't forget to set the environment variable NODE_ENV=production to avoid the slower, dev version of React. Like so:
`sh`
npx now -e NODE_ENV=production styfle/react-server-example-tsx
The original code from mhart attempts to sanitize the props by escaping and then inserting into a