Refactoring Youtube Player to use Flux — Part 1

Nabendu Biswas
2 min readApr 23, 2018


I have written a three part series to create a youtube player. It used only React and heavily depends on callbacks from children to parent and in one case two level deep.
We can solve this issue using three solutions — Flux, Redux , Context API. We will look into solving this with Flux in this tutorial.

We will first look briefly into what is Flux. Flux also follows the unidirectional flow of react, but it’s a closed circle. It have four parts — The React components, Actions, dispatcher and Store

React Component
It either creates an action or listen for a change in store or do both.

Do some action when triggered from component and pass it to dispatcher

Just a middleman, sends actions to all stores

Manages the logic and emits the changes, to be picked up by components.

We only need three components in this Flux refactoring. The basic flow will be as below. We will understand it more, once we build it.

Flux flow for Youtube Player

You can read rest of the blog from my blog site. The link is below.



Nabendu Biswas

Architect, ReactJS & Ecosystem Expert, Youtuber, Blogger