/react-and-event-emitters

A side by side comparison of using event emitters vs Redux for non data related communications in React.

Primary LanguageJavaScript

React and event emitters

This is the repo for a mini presentation at Phoenix React JS. The code is a side by side comparison of using event emitters vs Redux for non data related communications in React. Things like triggering a redirect or opening a modal can be done with redux, but they can also be picked up and handled through event emitters. This repo is an example of how the two patterns stack up against each other.

This is repo is purely meant for educational and thought invoking purposes only.

Getting started

  1. Clone the repo.
$ git clone git@github.com:garretttaco/react-and-event-emitters.git
  1. Set the Node version (we are using Node v9.5.0 because something something bleeding edge).
$ nvm use
  1. Install the dependancies.
$ npm i
  1. Run the app
$ npm start