mirror of
https://github.com/zhigang1992/reactfire.git
synced 2026-03-29 22:43:07 +08:00
ReactFire Comments Box Example
Setup Instructions
To run this example locally, either download the whole ReactFire repository or just this
/commentsBox/ directory. Then replace the example Firebase URL with your own Firebase URL in the
index.html file:
var firebaseApp = "https://my-firebase-app.firebaseio.com/"
Finally, start up a server via Python (or your preferred method):
$ python -m SimpleHTTPServer 8080
You can then visit the example in the browser of your choice at http://127.0.0.1:8080/.
Description
The official React tutorial is a great introduction to React. This example replaces the REST-like server used in the tutorial with Firebase and the ReactFire mixin.
ReactFire allows us to strip out the polling concept as well as the jQuery AJAX calls. Instead, with the ReactFire mixin, we can bind right to Firebase and keep everything in sync in realtime.