background…files.meetup.com/9951662/React-StevenVandeweghe-September201… · Unidirectional Data...

Post on 03-Jun-2020

7 views 0 download

Transcript of background…files.meetup.com/9951662/React-StevenVandeweghe-September201… · Unidirectional Data...

@bluecrowbar

Steven Vandeweghe iOS developer

background…

By JavaScript,Pixabay - pixabay.com, CC BY 4.0, https://commons.wikimedia.org/w/index.php?curid=49984167

never used

not on

reality distortion field

🤕

time tracking app

web macOS

iOS Android

web first

why React?

“learn once, write anywhere”

“a javascript library for building user interfaces”

I get it

the basics…

components

render()

JSX

mount

data

external → this.props internal → this.state

props

state

efficient?

efficient?

virtual DOM

lifecycle functions

render getInitialState

getDefaultProps propTypes

componentWillMount componentDidMount

componentWillUnmount shouldComponentUpdate

data?

unidirectional data flow

Image from Flux by Facebook

“you might not need Redux”

— Dan Abramov

https://medium.com/@dan_abramov/you-might-not-need-redux-be46360cf367#.4ea7e61oo

Single source of truth

State is read-only

Changes are made with pure functions

(reducers)

demo

tools

Thanks!

timeframeapp.com