https://github.com/stevehobbsdev/reacttododemo
A demo Todo app using Express, Browserify and React
https://github.com/stevehobbsdev/reacttododemo
Last synced: 3 months ago
JSON representation
A demo Todo app using Express, Browserify and React
- Host: GitHub
- URL: https://github.com/stevehobbsdev/reacttododemo
- Owner: stevehobbsdev
- License: mit
- Created: 2015-08-10T13:13:13.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2015-09-09T12:52:59.000Z (almost 11 years ago)
- Last Synced: 2024-12-31T20:16:00.992Z (over 1 year ago)
- Language: JavaScript
- Size: 219 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# React-Todo demo
A demo Todo app using Express, Browserify and React. This project also implements [isomorphic javascript][3] to render the component on the server as well as the client.
## Notes
- Browserify is configured to use React as an external dependency using [browserify-shim][1], instead of bundling it inline.
- [babel/register][2] is used to transform the
- check out _components/Todo.jsx_ for the main component code
- Browserify compiles everything to _public/javascripts/index.js_
- Note the call to `require('babel/register')` in app.js to allow the JSX component to be rendered server-side
- Note the call to `React.renderToString` in the index route to actually render the component on the server
## Tasks
- `$ npm start` - run the site (browse to http://localhost:3000) and start watchify to watch for changes on the component bundle
- `$ npm run compile` - compile the JSX components.
[1]: https://www.npmjs.org/package/browserify-shim
[2]: https://babeljs.io/docs/setup/#babel_register
[3]: http://nerds.airbnb.com/isomorphic-javascript-future-web-apps/