The ability to reply to discussions is limited to PRO members. Want to join in the discussion? Click here to subscribe now.

React Flux: Overview and Dispatchers

React Flux: Overview and Dispatchers

4:24
Flux has four major components: Stores, Dispatchers, Views, and Actions. These components interact less like a typical MVC and more like an Event Bus. In this lesson we will start by creating our Dispatcher which queues up our Actions as Promises and executes them as they are received. We'll also create an AppDispatcher which, unlike the Dispatcher, is more specific to our application.
Watch this lesson now
Avatar
egghead.io

Flux has four major components: Stores, Dispatchers, Views, and Actions. These components interact less like a typical MVC and more like an Event Bus. In this lesson we will start by creating our Dispatcher which queues up our Actions as Promises and executes them as they are received. We'll also create an AppDispatcher which, unlike the Dispatcher, is more specific to our application.

Avatar
hipertracker

require('react/lib/merge') does not work in React 0.12. It has been removed from the core, see:
https://github.com/facebook/react/blob/master/src/vendor_deprecated/core/merge.js

In reply to egghead.io
Avatar
Kristofer

I'm a noob on this stuff as well, but I just started going through the lessons and noticed this too. Given FB has open sourced their dispatcher (probably after this lesson was created), it seems like you can now eliminate the boilerplate dispatcher provided in the video and just use the one from the flux npm package.

Your app specific dispatcher just becomes like this then:

https://github.com/facebook/flux/blob/master/examples/flux-todomvc/js/dispatcher/AppDispatcher.js

Hope this helps.

Kris

In reply to hipertracker
Avatar
felix

Thanks a lot for this! Saved me a few minutes haha

In reply to Kristofer
HEY, QUICK QUESTION!
Joel's Head
Why are we asking?