Slide 1

Slide 1 text

I Hated React too Soon, Reconciled with It Quickly Afterwards Tugberk Ugurlu Software Engineer @ Redgate @tourismgeek http://tugberkugurlu.com https://flic.kr/p/cQRAYC

Slide 2

Slide 2 text

https://flic.kr/p/e6nUW Aim of the Talk

Slide 3

Slide 3 text

https://flic.kr/p/t3H9A Once upon a time…

Slide 4

Slide 4 text

https://flic.kr/p/cEJMpW

Slide 5

Slide 5 text

https://flic.kr/p/faTRHU

Slide 6

Slide 6 text

https://flic.kr/p/7yqhJt JSX!

Slide 7

Slide 7 text

https://flic.kr/p/6sZ7Kp

Slide 8

Slide 8 text

https://twitter.com/tourismgeek/status/637380542191796224

Slide 9

Slide 9 text

https://twitter.com/tourismgeek/status/637380542191796224

Slide 10

Slide 10 text

No content

Slide 11

Slide 11 text

https://flic.kr/p/6doME6

Slide 12

Slide 12 text

No content

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

TODO: WHY! https://flic.kr/p/9yaos5

Slide 15

Slide 15 text

React is Simple Give it an input, get an output React does one thing and it does it well It has a small public API surface area

Slide 16

Slide 16 text

https://twitter.com/thomasfuchs/status/708675139253174273

Slide 17

Slide 17 text

React is Simple “React applications start complex but maintenance complexity of React applications doesn’t grow much as your applications grow

Slide 18

Slide 18 text

Its declarative and predictable nature High level of transferable knowledge Learn once, write everywhere

Slide 19

Slide 19 text

React shines with Redux

Slide 20

Slide 20 text

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

Slide 21

Slide 21 text

What is Redux? (in human English) “Kind of like event sourcing and pub/sub, with a fancier name.

Slide 22

Slide 22 text

The Problem

Slide 23

Slide 23 text

Redux Store

Slide 24

Slide 24 text

The Meat of Redux Actions Reducers Store

Slide 25

Slide 25 text

The Meat of Redux Actions Actions describe updates

Slide 26

Slide 26 text

The Meat of Redux Reducers Reducers apply updates based on actions

Slide 27

Slide 27 text

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

Slide 28

Slide 28 text

Simple Example: Counter

Slide 29

Slide 29 text

React Usage (Manual Way)

Slide 30

Slide 30 text

Usage with React

Slide 31

Slide 31 text

The Whole Idea Data Down Actions Up http://www.samselikoff.com/blog/data-down-actions-up/

Slide 32

Slide 32 text

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

Slide 33

Slide 33 text

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

Slide 34

Slide 34 text

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

Slide 35

Slide 35 text

It boils down to scientific reasons https://flic.kr/p/byrtr Well... NO!

Slide 36

Slide 36 text

Widely Adopted

Slide 37

Slide 37 text

Widely Adopted

Slide 38

Slide 38 text

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

Slide 39

Slide 39 text

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

Slide 40

Slide 40 text

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

Slide 41

Slide 41 text

Boost on Happiness with React and Redux https://flic.kr/p/99iZtS

Slide 42

Slide 42 text

https://twitter.com/dan_abramov/status/780475600716857344

Slide 43

Slide 43 text

https://github.com/facebook/react-devtools React Developer Tools

Slide 44

Slide 44 text

Redux Developer Tools https://github.com/gaearon/redux-devtools https://github.com/zalmoxisus/redux-devtools-extension

Slide 45

Slide 45 text

Redux Logger npm install redux-logger https://github.com/evgenyrodionov/redux-logger

Slide 46

Slide 46 text

Redux Immutable State Checker npm install redux-immutable-state-invariant https://github.com/leoasis/redux-immutable-state-invariant

Slide 47

Slide 47 text

Redux Undo npm install redux-undo https://github.com/omnidan/redux-undo

Slide 48

Slide 48 text

https://github.com/joshwcomeau/redux-vcr Redux VCR

Slide 49

Slide 49 text

https://twitter.com/tourismgeek/status/767629396916178947

Slide 50

Slide 50 text

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

Slide 51

Slide 51 text

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

Slide 52

Slide 52 text

Some Resources • My Blog Post on React: http://bit.ly/2jwicka • React Docs: https://facebook.github.io/react/docs/hello-world.html • Redux Docs: http://redux.js.org • The Redux Journey at react-europe 2016: http://bit.ly/2bJEZEP • 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

Slide 53

Slide 53 text

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

Slide 54

Slide 54 text

Redux Internals: It’s Freakin Tiny!