Git Product home page Git Product logo

todo-redux-saga's Introduction

CircleCI

A simple Todo app example built with Create React App, React Redux, Redux Saga, and Firebase

Try the demo at todo-redux-saga.firebaseapp.com.

Stack

  • Create React App
  • React Redux
  • React Router
  • React Router Redux
  • Redux Saga
  • Redux Devtools Extension for Chrome
  • Firebase SDK with OAuth authentication
  • Immutable
  • Reselect
  • SASS

Quick Start

$ git clone https://github.com/r-park/todo-redux-saga.git
$ cd todo-redux-saga
$ npm install
$ npm start

Deploying to Firebase

Prerequisites:

Configure this app with your project-specific details:

// .firebaserc

{
  "projects": {
    "default": "your-project-id"
  }
}
// src/firebase/config.js

export const firebaseConfig = {
  apiKey: 'your api key',
  authDomain: 'your-project-id.firebaseapp.com',
  databaseURL: 'https://your-project-id.firebaseio.com',
  storageBucket: 'your-project-id.appspot.com'
};

Install firebase-tools:

$ npm install -g firebase-tools

Build and deploy the app:

$ npm run build
$ firebase login
$ firebase use default
$ firebase deploy

NPM Commands

Script Description
npm start Start webpack development server @ localhost:3000
npm run build Build the application to ./build directory
npm test Test the application; watch for changes and retest

todo-redux-saga's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

todo-redux-saga's Issues

Heroku Deployement

Hi there,

Great repo, thanks for your effort on this.
I want to deploy my application to heroku instead of firebase. However I am not able to run start script after deployement. Any chance you may know what I may be missing? Npm run build && npm run server should do the trick or?

Thanks,
Arda

history.push/replace vs react-router-redux's push

Hey, first off, thank you so much for this example (as well as the other redux/firebase w/o sagas example). They seem to be a near perfect example on getting a basic/standard firebase setup inside a React/Redux project (you probably saved me days of effort just on the firebase code.... then the saga code, with a version without sagas for reference is amazing). While by no means critical, it may be worth making the 2 more consistent (ie. same action constants).

Anyway, aside from thanking you, I definitely want to pick your brain on a few things... in some cases it's hard to figure out if you are doing something in a specific way just because this example is concentrating on demoing other features and you just didn't care about certain parts... or if there are specific reasons for parts of the code.

One question I have is, is there a reason you are using history.push instead of react-router-redux's push action?

Also, is firebase-list.js based off of some other example/project.. or is it completely custom for these examples? (either way THANK YOU, it's a great piece of code I have already stolen)

Thanks in advance, and sorry for creating an issue for my questions... but I figure this being a demo repo, the issue won't be cluttering up more important ones.

firebase classes for more complex data structures

Hey @r-park love this example. I've applied this example's logic to a more complex firebase structure with denormalized entries.

How would you recommend building a firebase model that can support lists of objects like this?

{
  "some-list" : {
    "-KbgyM0uO2l9oHCDwzAq" : {
      "prop" : "great",
      "some-ids" : {
        "-KbgyM-bzdBprmzIePhp" : true,
        "-KbwQ_AiyQcagPHnoEeI" : true
      },
      "other-ids" : {
        "again" : true,
        "nice" : true,
        "try" : true,
        "word" : true
      }
    },
    "-KbhA_tJ9ZyqQVzwHwWT" : {
      "item" : "fun",
      "some-ids" : {
        "-KbhA_sCvTVPBaFBRYcL" : true,
        "-KbwIevJI96eLSBP9h3b" : true
      },
      "other-ids" : {
        "again" : true,
        "new" : true,
        "nice" : true,
        "try" : true
      }
    }
  }
}

The existing firebase-list works really well for a list of simple objects, but is a little clunky for lists with other simple lists nested inside. Maybe some sort of composable model structure? I've also looked at firebase-saga which takes a more functional approach, although, I like being able to set the class properties in the watchers.

I'm a little torn on how to proceed. What do you recommend for more complex, denormalized structures?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.