Code Monkey home page Code Monkey logo

react-todomvc's People

Contributors

jialezhang avatar

Watchers

 avatar

react-todomvc's Issues

关于flux

/**

  • Flux Explanation of Store:
  • Stores contain the application state and logic. Their role is somewhat similar to a model in a traditional MVC, but
  • they manage the state of many objects. Nor are they the same as Backbone's collections. More than simply managing a
  • collection of ORM-style objects, stores manage the application state for a particular domain within the application.
    *
  • A store registers itself with the dispatcher and provides it with a callback. This callback receives a data payload
  • as a parameter. The payload contains an action with an attribute identifying the action's type. Within the store's
  • registered callback, a switch statement based on the action's type is used to interpret the payload and to provide the
  • proper hooks into the store's internal methods. This allows an action to result in an update to the state of the store,
  • via the dispatcher. After all the stores are updated, they broadcast an event declaring that their state has changed,
  • so the views may query the new state and update themselves.
    *
  • Alt Implementation of Stores:
  • These are the stores returned by alt.createStore, they will not have the methods defined in your StoreModel because flux
  • stores do not have direct setters. However, any static methods defined in your StoreModel will be transferred to this object.
    *
  • Please note: Static methods defined on a store model are nothing more than synthetic sugar for exporting the method as a public
  • method of your alt instance. This means that this will be bound to the store instance. It is recommended to explicitly export
  • the methods in the constructor using StoreModel#exportPublicMethods.

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.