Slide 1

Slide 1 text

Redux Tugberk Ugurlu

Slide 2

Slide 2 text

The Problem

Slide 3

Slide 3 text

What is Redux? “Redux is a state management library for JavaScript applications, inspired by Flux and Elm.

Slide 4

Slide 4 text

The Meat of Redux Actions Reducers Store

Slide 5

Slide 5 text

The Meat of Redux Actions Actions describe updates

Slide 6

Slide 6 text

The Meat of Redux Reducers Reducers apply updates based on actions

Slide 7

Slide 7 text

The Meat of Redux Store Store is where everything comes together and it acts as the source of truth

Slide 8

Slide 8 text

Simple Example: Counter

Slide 9

Slide 9 text

React Usage (Manual Way)

Slide 10

Slide 10 text

Usage with React (Much Better)

Slide 11

Slide 11 text

The Whole Idea You have one state, one state only for your entire application! https://flic.kr/p/9QQHW

Slide 12

Slide 12 text

The Whole Idea You never mutate the state! https://flic.kr/p/pzf72v

Slide 13

Slide 13 text

But why Redux and not flux, mobx, marty? https://flic.kr/p/NzcYg

Slide 14

Slide 14 text

Widely Adopted

Slide 15

Slide 15 text

Widely Adopted

Slide 16

Slide 16 text

Rich Docs and Resources http://redux.js.org/

Slide 17

Slide 17 text

Rich Ecosystem https://www.npmjs.com/search?q=redux

Slide 18

Slide 18 text

Rich Ecosystem http://redux-form.com/6.0.0-rc.5

Slide 19

Slide 19 text

99% Boost on Dev Happiness https://flic.kr/p/99iZtS

Slide 20

Slide 20 text

99% Boost on Dev Happiness npm install redux-logger https://github.com/evgenyrodionov/redux-logger

Slide 21

Slide 21 text

99% Boost on Dev Happiness npm install redux-immutable-state-invariant https://github.com/leoasis/redux-immutable-state-invariant

Slide 22

Slide 22 text

99% Boost on Dev Happiness npm install redux-undo https://github.com/omnidan/redux-undo

Slide 23

Slide 23 text

No content

Slide 24

Slide 24 text

https://egghead.io/courses/getting-started-with-redux Some Resources

Slide 25

Slide 25 text

https://egghead.io/courses/building-react-applications-with-idiomatic-redux Some Resources

Slide 26

Slide 26 text

Some Resources • Redux Docs: http://redux.js.org • The Redux Journey at react-europe 2016: http://bit.ly/2bJEZEP • Flux Architecture: https://facebook.github.io/flux/docs/overview.html • Redux Usage with React: http://bit.ly/2bdAiVO • Presentational and Container Components: http://bit.ly/2bM3DpO • (Pluralsight Course) Building Applications with React and Redux in ES6: http://bit.ly/2bRAQ4T • Thinking in React: https://facebook.github.io/react/docs/thinking-in-react.html • React Reconciliation: https://facebook.github.io/react/docs/reconciliation.html • Influencers of Redux: https://github.com/reactjs/redux#influences • Why did you reinvented Event Sourcing?: https://github.com/gaearon/ama/issues/110