A React & react-router-powered implementation of Hacker News using its Firebase API.
Live version: http://insin.github.io/react-hn
- Supports display of all item types: stories, jobs, polls and comments
- Basic user profiles
- Collapsible comments
- "Realtime" updates (free via Firebase!)
- Comment counts and last visit times for stories are cached in localStorage
- New comments are highlighted:
- Comments since your last visit to an item
- New comments which load while you're reading an item
- Stories with new threads (top-level replies) are marked on list pages
- Stories can be marked as read to remove highighting from new comments
- "new" and "comments" sections driven by the Changed Items API.
Install gulp (if you don't already have it) and dependencies:
npm install -g gulp
npm install
gulp dist
- builds from scratch into the/dist
directory.gulp watch
- watches JavaScript in/src
, linting, transpiling, browserifying and copying to/dist
on every change.
Pass a --production
flag to use minified JavaScript.
The version of reactfire used in the live build has been hand-tweaked to work around an issue when browerifying it.