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

Flux Architecture: Application Dispatcher

Flux Architecture: Application Dispatcher

1:55
In this lesson we'll create a very simple application dispatcher utilizing the open source flux dispatcher from Facebook.
Watch this lesson now
Avatar
egghead.io

In this lesson we'll create a very simple application dispatcher utilizing the open source flux dispatcher from Facebook.

Avatar
Stephen

Joe... When creating the facade for Flux’s Dispatcher, your parameter list for “dispatch” (actionType, action) does not match the Flux implementation (payload). This single “payload” parameter is an object which has an “actionType” property. In the next lesson you will correctly call the dispatch façade with a single argument of “{actionType, item}”.

Avatar
Joseph

Thanks for the feedback, Stephen. Good catch, I'll see about updating that description.

In reply to Stephen
Avatar
Pete

How does the Events dependency get added to react projects?

If i was building a node application and running with node index.js, I know it's apart of the node-core; however when we're building these react flux apps and extending the event emitter, I don't quite understand where that dependency comes from?

We aren't doing npm install events anywhere, it just seems to magically be there. Could you please shed some light on this?

Thank you!

Avatar
Martin

Node comes with a bunch of libraries, events being one of them. Since node is installed on your system and used by webpack when compiling your code it will be available and bundled in your app. You can do that with every package that comes with node.

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