/egghead-mobx

my experiment converting the Github Note Taker app to Mobx

Primary LanguageJavaScriptMIT LicenseMIT

egghead-mobx

my attempt to convert the Github Note Taker app to use Mobx...

Dependency Status

NOTE: this code no longer uses firebase and re-base

I am now using json-server to handle reading & writing notes:

npm install -g json-server

npm run notes
npm start

You can view the content of db.json in order to see the changes you are making to notes.

BACKGROUND:

I took the Build Your First React.js App by Tyler McGinnis on egghead.io and decided to continue refining and refactoring the app that was created in that course. My initial thought was to convert it to Redux, but i found that a bit daunting since i was still trying to learn Redux. I found a reference to Mobx and after reading a little about it, i decided to try that approach first. This app is the result of that exploration.

Some of the features include:

  • refined UI elements
  • a store built on Mobx
  • uses axios for all api calls
  • a notes REST api built on top of json-server
  • a simple html5 pushstate mechanism
  • saves last valid username to local storage
  • initializes app from URL if it matches /profile/:username
  • otherwise it reloads last username from local storage
  • a simple navigator for visited usernames

DEPLOYMENT

I created another repo which contains the code required to deploy this app to heroku. You can find that here:

heroku-egghead-mobx

Some of it's features include:

  • simple embedded notes api built on mongoose
  • notes are persisted to mlab
  • code to enforce SSL, leveraging heroku's certs
  • code to support the Single Page App model

The deployed app can be found here: egghead-mobx

REFERENCE:

babel-node devServer.js
webpack-dev-server

json-server --watch db.json