SlideShare a Scribd company logo
Using Redux
Maximising development efficiency
Static
websites
Singe Page
Applications
complexity
Refresh
page
LiveReload
CSS
time
HMR
(Hot Module Reload)
JS
(stateless
components)
HMR
JS
(everything)
Redux
Why Redux is natural
Demo: Redux in use
criticalcss.com
Performance, tooling, React
Penthouse - critical css generator
About me
@pocketjoso pocketjoso
Jonas Ohlsson - front end developer
https://jonassebastianohlsson.com
• Redux - overview
• criticalcss.com redux usage in practice
This talk
• Predictable State container (evolution of Flux)
• One single immutable State
• Reducers instead of Stores
• Hot Module Reloading and Time travel
• Modular, tiny (2kb!)
• Follows Best practice
What is Redux
Redux vs traditional Flux
Action Reducer
(Redux)
Store ViewRedux
Flux
Data flow
Today’s example
• Dispatch action for new generate job
• Update State via reducer
• Receive State in Component
Action creatorAction Reducer Store View
• Returns actions; does not dispatch them
• Write reducers instead of Stores
• Pure functions
• (state, action) => newState
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce
Reducers
ReducerAction Reducer Store View
Redux StoreAction Reducer Store View
Provider Connect
ViewAction Reducer Store
Redux using react-redux
Data flow with react-redux
(Store) Provider
• Wraps whole App
Provider
• Makes Store available to components
Store
ConnectConnect
• Injects props, subscribes to Store
• Keeps components Dumb
View
ConnectConnect View
• won’t work - actionCreator does not dispatch action
ConnectConnect View
• Connect auto-injects dispatch to props
Connect
• 2nd param creates self-dispatching action functions
Connect View
• write Reducers instead of Stores
• keep Components dumb using Connect
• benefit from:
• Hot Module Reloading
• Powerful DevTools
• Components easier to understand and test
Summary
That’s all!
Recommended packages
• Redux - https://github.com/rackt/redux
• React transform boilerplate (for Hot Module Reloading) - https://github.com/gaearon/react-
transform-boilerplate
• Redux DevTools - https://github.com/gaearon/redux-devtools
Redux resources
• Redux release and intro to Time travel - https://www.youtube.com/watch?v=xsSnOQynTHs
• Best starting point for understanding redux - Free video tutorial on Redux by Dan Abramov
(creator) - https://egghead.io/lessons/javascript-redux-the-single-immutable-state-tree
• Written notes for above video tutorial - https://gist.github.com/diegoconcha/
8918294bb9df69876b22
• Official docs (great) - http://rackt.org/redux/index.html
• Redux slim in a gist - https://gist.github.com/gaearon/ffd88b0e4f00b22c3159
Resources
Redux related resources
• Full stack Redux tutorial - http://teropa.info/blog/2015/09/10/full-stack-redux-tutorial.html
• Redux for state management - http://konkle.us/state-management-with-redux/
• Full stack Redux boilerplate - https://github.com/erikras/react-redux-universal-hot-example
• Support for Functional Components in React Transform -https://github.com/gaearon/babel-plugin-
react-transform/issues/57
• Beyond just Redux for async actions - riadbenguella.com/from-actions-creators-to-sagas-redux-
upgraded
Other related resources
• Webpack (react docs) - https://christianalfoni.github.io/react-webpack-cookbook/index.html
• Functional Stateless Components - http://tylermcginnis.com/functional-components-vs-stateless-
functional-components-vs-stateless-components/
• https://medium.com/@esamatti/react-js-pure-render-performance-anti-pattern-fb88c101332f
Resources

More Related Content

What's hot

React.js and Redux overview
React.js and Redux overviewReact.js and Redux overview
React.js and Redux overview
Alex Bachuk
 
How to Redux
How to ReduxHow to Redux
How to Redux
Ted Pennings
 
React + Redux + TypeScript === ♥
React + Redux + TypeScript === ♥React + Redux + TypeScript === ♥
React + Redux + TypeScript === ♥
Remo Jansen
 
React & Redux
React & ReduxReact & Redux
React & Redux
Federico Bond
 
Let's discover React and Redux with TypeScript
Let's discover React and Redux with TypeScriptLet's discover React and Redux with TypeScript
Let's discover React and Redux with TypeScript
Mathieu Savy
 
Building React Applications with Redux
Building React Applications with ReduxBuilding React Applications with Redux
Building React Applications with Redux
FITC
 
Academy PRO: React JS. Redux & Tooling
Academy PRO: React JS. Redux & ToolingAcademy PRO: React JS. Redux & Tooling
Academy PRO: React JS. Redux & Tooling
Binary Studio
 
A Brief Introduction to React.js
A Brief Introduction to React.jsA Brief Introduction to React.js
A Brief Introduction to React.js
Doug Neiner
 
React / Redux Architectures
React / Redux ArchitecturesReact / Redux Architectures
React / Redux Architectures
Vinícius Ribeiro
 
React state managmenet with Redux
React state managmenet with ReduxReact state managmenet with Redux
React state managmenet with Redux
Vedran Blaženka
 
JS Chicago Meetup 2/23/16 - Redux & Routes
JS Chicago Meetup 2/23/16 - Redux & RoutesJS Chicago Meetup 2/23/16 - Redux & Routes
JS Chicago Meetup 2/23/16 - Redux & Routes
Nick Dreckshage
 
React state management with Redux and MobX
React state management with Redux and MobXReact state management with Redux and MobX
React state management with Redux and MobX
Darko Kukovec
 
Angular redux
Angular reduxAngular redux
Angular redux
Nir Kaufman
 
React.js in real world apps.
React.js in real world apps. React.js in real world apps.
React.js in real world apps.
Emanuele DelBono
 
Better web apps with React and Redux
Better web apps with React and ReduxBetter web apps with React and Redux
Better web apps with React and Redux
Ali Sa'o
 
React and redux
React and reduxReact and redux
React and redux
Mystic Coders, LLC
 
React & redux
React & reduxReact & redux
React & redux
Cédric Hartland
 
React for Dummies
React for DummiesReact for Dummies
React for Dummies
Mitch Chen
 
Redux training
Redux trainingRedux training
Redux training
dasersoft
 

What's hot (20)

React.js and Redux overview
React.js and Redux overviewReact.js and Redux overview
React.js and Redux overview
 
How to Redux
How to ReduxHow to Redux
How to Redux
 
React + Redux + TypeScript === ♥
React + Redux + TypeScript === ♥React + Redux + TypeScript === ♥
React + Redux + TypeScript === ♥
 
React & Redux
React & ReduxReact & Redux
React & Redux
 
Let's discover React and Redux with TypeScript
Let's discover React and Redux with TypeScriptLet's discover React and Redux with TypeScript
Let's discover React and Redux with TypeScript
 
Building React Applications with Redux
Building React Applications with ReduxBuilding React Applications with Redux
Building React Applications with Redux
 
Academy PRO: React JS. Redux & Tooling
Academy PRO: React JS. Redux & ToolingAcademy PRO: React JS. Redux & Tooling
Academy PRO: React JS. Redux & Tooling
 
A Brief Introduction to React.js
A Brief Introduction to React.jsA Brief Introduction to React.js
A Brief Introduction to React.js
 
React / Redux Architectures
React / Redux ArchitecturesReact / Redux Architectures
React / Redux Architectures
 
React state managmenet with Redux
React state managmenet with ReduxReact state managmenet with Redux
React state managmenet with Redux
 
JS Chicago Meetup 2/23/16 - Redux & Routes
JS Chicago Meetup 2/23/16 - Redux & RoutesJS Chicago Meetup 2/23/16 - Redux & Routes
JS Chicago Meetup 2/23/16 - Redux & Routes
 
React js
React jsReact js
React js
 
React state management with Redux and MobX
React state management with Redux and MobXReact state management with Redux and MobX
React state management with Redux and MobX
 
Angular redux
Angular reduxAngular redux
Angular redux
 
React.js in real world apps.
React.js in real world apps. React.js in real world apps.
React.js in real world apps.
 
Better web apps with React and Redux
Better web apps with React and ReduxBetter web apps with React and Redux
Better web apps with React and Redux
 
React and redux
React and reduxReact and redux
React and redux
 
React & redux
React & reduxReact & redux
React & redux
 
React for Dummies
React for DummiesReact for Dummies
React for Dummies
 
Redux training
Redux trainingRedux training
Redux training
 

Viewers also liked

Killer page load performance
Killer page load performanceKiller page load performance
Killer page load performance
Jonas Ohlsson Aden
 
Automating Faster Page Rendering - step by step from start to finish
Automating Faster Page Rendering - step by step from start to finishAutomating Faster Page Rendering - step by step from start to finish
Automating Faster Page Rendering - step by step from start to finish
Jonas Ohlsson Aden
 
Isomorphic react in real life
Isomorphic react in real lifeIsomorphic react in real life
Isomorphic react in real life
Jonas Ohlsson Aden
 
Reduxについて
ReduxについてReduxについて
Reduxについて
Yuusuke Takeuchi
 
`redux`と`flux`を比べてみたときの個人的な感想
`redux`と`flux`を比べてみたときの個人的な感想`redux`と`flux`を比べてみたときの個人的な感想
`redux`と`flux`を比べてみたときの個人的な感想
佐藤 俊太郎
 
Let's Redux!
Let's Redux!Let's Redux!
Let's Redux!
Joseph Chiang
 
Natural beauty
Natural beautyNatural beauty
Natural beauty
Pyramid Connections
 
Retail Loyalty Congress 2016 // Masterclass IceMobile
Retail Loyalty Congress 2016 // Masterclass IceMobile Retail Loyalty Congress 2016 // Masterclass IceMobile
Retail Loyalty Congress 2016 // Masterclass IceMobile
Anna Witteman
 
для клиентов франчайзинг
для клиентов франчайзингдля клиентов франчайзинг
для клиентов франчайзингMarina Kirilyuk
 
What’s next for the next generation of Recruiter? | Talent Connect 2016
What’s next for the next generation of Recruiter? | Talent Connect 2016What’s next for the next generation of Recruiter? | Talent Connect 2016
What’s next for the next generation of Recruiter? | Talent Connect 2016
LinkedIn Talent Solutions
 
Ready4S portfolio
Ready4S portfolioReady4S portfolio
Ready4S portfolio
Ready4S
 
Akamai State of the Internet Q4 2008
Akamai State of the Internet Q4 2008Akamai State of the Internet Q4 2008
Akamai State of the Internet Q4 2008
Amit Ranjan
 
Careering: Reflexivity, play and a life in the media - Pat Kane
Careering: Reflexivity, play and a life in the media - Pat KaneCareering: Reflexivity, play and a life in the media - Pat Kane
Careering: Reflexivity, play and a life in the media - Pat Kane
www.patkane.global
 
10 Monsters from a Content Marketer’s Nightmare: A Halloween SlideSCARE
10 Monsters from a Content Marketer’s Nightmare: A Halloween SlideSCARE10 Monsters from a Content Marketer’s Nightmare: A Halloween SlideSCARE
10 Monsters from a Content Marketer’s Nightmare: A Halloween SlideSCARE
Uberflip
 
Kk dengan jamban yang sehat dari 5 kota
Kk dengan jamban yang sehat dari 5 kotaKk dengan jamban yang sehat dari 5 kota
Kk dengan jamban yang sehat dari 5 kotawely supriatna
 
Raspberry pi 用アクセサリ
Raspberry pi 用アクセサリRaspberry pi 用アクセサリ
Raspberry pi 用アクセサリ
Tsuyoshi Horigome
 
Design Matters: Industrial Design & Product Styling in Wearable Tech
Design Matters: Industrial Design & Product Styling in Wearable TechDesign Matters: Industrial Design & Product Styling in Wearable Tech
Design Matters: Industrial Design & Product Styling in Wearable Tech
Christopher Grayson
 
Leveraging Social Media Optimization for Online Marketing
Leveraging Social Media Optimization for Online MarketingLeveraging Social Media Optimization for Online Marketing
Leveraging Social Media Optimization for Online Marketing
Tom Walls
 
Wicked ambiguity-content-strategy-140518173929-phpapp02
Wicked ambiguity-content-strategy-140518173929-phpapp02Wicked ambiguity-content-strategy-140518173929-phpapp02
Wicked ambiguity-content-strategy-140518173929-phpapp02
Vera Kovaleva
 
Working While Pregnant: 7 Most Pressing Questions Answered
Working While Pregnant: 7 Most Pressing Questions AnsweredWorking While Pregnant: 7 Most Pressing Questions Answered
Working While Pregnant: 7 Most Pressing Questions Answered
lawsuitlegal
 

Viewers also liked (20)

Killer page load performance
Killer page load performanceKiller page load performance
Killer page load performance
 
Automating Faster Page Rendering - step by step from start to finish
Automating Faster Page Rendering - step by step from start to finishAutomating Faster Page Rendering - step by step from start to finish
Automating Faster Page Rendering - step by step from start to finish
 
Isomorphic react in real life
Isomorphic react in real lifeIsomorphic react in real life
Isomorphic react in real life
 
Reduxについて
ReduxについてReduxについて
Reduxについて
 
`redux`と`flux`を比べてみたときの個人的な感想
`redux`と`flux`を比べてみたときの個人的な感想`redux`と`flux`を比べてみたときの個人的な感想
`redux`と`flux`を比べてみたときの個人的な感想
 
Let's Redux!
Let's Redux!Let's Redux!
Let's Redux!
 
Natural beauty
Natural beautyNatural beauty
Natural beauty
 
Retail Loyalty Congress 2016 // Masterclass IceMobile
Retail Loyalty Congress 2016 // Masterclass IceMobile Retail Loyalty Congress 2016 // Masterclass IceMobile
Retail Loyalty Congress 2016 // Masterclass IceMobile
 
для клиентов франчайзинг
для клиентов франчайзингдля клиентов франчайзинг
для клиентов франчайзинг
 
What’s next for the next generation of Recruiter? | Talent Connect 2016
What’s next for the next generation of Recruiter? | Talent Connect 2016What’s next for the next generation of Recruiter? | Talent Connect 2016
What’s next for the next generation of Recruiter? | Talent Connect 2016
 
Ready4S portfolio
Ready4S portfolioReady4S portfolio
Ready4S portfolio
 
Akamai State of the Internet Q4 2008
Akamai State of the Internet Q4 2008Akamai State of the Internet Q4 2008
Akamai State of the Internet Q4 2008
 
Careering: Reflexivity, play and a life in the media - Pat Kane
Careering: Reflexivity, play and a life in the media - Pat KaneCareering: Reflexivity, play and a life in the media - Pat Kane
Careering: Reflexivity, play and a life in the media - Pat Kane
 
10 Monsters from a Content Marketer’s Nightmare: A Halloween SlideSCARE
10 Monsters from a Content Marketer’s Nightmare: A Halloween SlideSCARE10 Monsters from a Content Marketer’s Nightmare: A Halloween SlideSCARE
10 Monsters from a Content Marketer’s Nightmare: A Halloween SlideSCARE
 
Kk dengan jamban yang sehat dari 5 kota
Kk dengan jamban yang sehat dari 5 kotaKk dengan jamban yang sehat dari 5 kota
Kk dengan jamban yang sehat dari 5 kota
 
Raspberry pi 用アクセサリ
Raspberry pi 用アクセサリRaspberry pi 用アクセサリ
Raspberry pi 用アクセサリ
 
Design Matters: Industrial Design & Product Styling in Wearable Tech
Design Matters: Industrial Design & Product Styling in Wearable TechDesign Matters: Industrial Design & Product Styling in Wearable Tech
Design Matters: Industrial Design & Product Styling in Wearable Tech
 
Leveraging Social Media Optimization for Online Marketing
Leveraging Social Media Optimization for Online MarketingLeveraging Social Media Optimization for Online Marketing
Leveraging Social Media Optimization for Online Marketing
 
Wicked ambiguity-content-strategy-140518173929-phpapp02
Wicked ambiguity-content-strategy-140518173929-phpapp02Wicked ambiguity-content-strategy-140518173929-phpapp02
Wicked ambiguity-content-strategy-140518173929-phpapp02
 
Working While Pregnant: 7 Most Pressing Questions Answered
Working While Pregnant: 7 Most Pressing Questions AnsweredWorking While Pregnant: 7 Most Pressing Questions Answered
Working While Pregnant: 7 Most Pressing Questions Answered
 

Similar to Using redux

MidwestJS 2014 Reconciling ReactJS as a View Layer Replacement
MidwestJS 2014 Reconciling ReactJS as a View Layer ReplacementMidwestJS 2014 Reconciling ReactJS as a View Layer Replacement
MidwestJS 2014 Reconciling ReactJS as a View Layer Replacement
Zach Lendon
 
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)
Zach Lendon
 
Redux Tech Talk
Redux Tech TalkRedux Tech Talk
Redux Tech Talk
Chathuranga Jayanath
 
Advanced React
Advanced ReactAdvanced React
Advanced React
Mike Wilcox
 
Understanding Facebook's React.js
Understanding Facebook's React.jsUnderstanding Facebook's React.js
Understanding Facebook's React.js
Federico Torre
 
ReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparisonReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparison
500Tech
 
React js
React jsReact js
React js
Rajesh Kolla
 
Introduce Flux & react in practices (KKBOX)
Introduce Flux & react in practices (KKBOX)Introduce Flux & react in practices (KKBOX)
Introduce Flux & react in practices (KKBOX)
Hsuan Fu Lien
 
Making react part of something greater
Making react part of something greaterMaking react part of something greater
Making react part of something greater
Darko Kukovec
 
Introduce flux & react in practice
Introduce flux & react in practiceIntroduce flux & react in practice
Introduce flux & react in practice
Hsuan Fu Lien
 
React - Start learning today
React - Start learning today React - Start learning today
React - Start learning today
Nitin Tyagi
 
An Overview of the React Ecosystem
An Overview of the React EcosystemAn Overview of the React Ecosystem
An Overview of the React Ecosystem
FITC
 
Introduction to GitHub Actions - How to easily automate and integrate with Gi...
Introduction to GitHub Actions - How to easily automate and integrate with Gi...Introduction to GitHub Actions - How to easily automate and integrate with Gi...
Introduction to GitHub Actions - How to easily automate and integrate with Gi...
All Things Open
 
One code Web, iOS, Android
One code Web, iOS, AndroidOne code Web, iOS, Android
One code Web, iOS, Android
Artem Marchenko
 
React.js at Cortex
React.js at CortexReact.js at Cortex
React.js at Cortex
Geoff Harcourt
 
A React Journey
A React JourneyA React Journey
A React Journey
LinkMe Srl
 
Reactjs notes.pptx for web development- tutorial and theory
Reactjs  notes.pptx for web development- tutorial and theoryReactjs  notes.pptx for web development- tutorial and theory
Reactjs notes.pptx for web development- tutorial and theory
jobinThomas54
 
Building a website without a webserver on Azure
Building a website without a webserver on AzureBuilding a website without a webserver on Azure
Building a website without a webserver on Azure
Todd Whitehead
 
React gsg presentation with ryan jung & elias malik
React   gsg presentation with ryan jung & elias malikReact   gsg presentation with ryan jung & elias malik
React gsg presentation with ryan jung & elias malik
Lama K Banna
 
Using redux and angular 2 with meteor
Using redux and angular 2 with meteorUsing redux and angular 2 with meteor
Using redux and angular 2 with meteor
Ken Ono
 

Similar to Using redux (20)

MidwestJS 2014 Reconciling ReactJS as a View Layer Replacement
MidwestJS 2014 Reconciling ReactJS as a View Layer ReplacementMidwestJS 2014 Reconciling ReactJS as a View Layer Replacement
MidwestJS 2014 Reconciling ReactJS as a View Layer Replacement
 
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)
Reconciling ReactJS as a View Layer Replacement (MidwestJS 2014)
 
Redux Tech Talk
Redux Tech TalkRedux Tech Talk
Redux Tech Talk
 
Advanced React
Advanced ReactAdvanced React
Advanced React
 
Understanding Facebook's React.js
Understanding Facebook's React.jsUnderstanding Facebook's React.js
Understanding Facebook's React.js
 
ReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparisonReactJS vs AngularJS - Head to Head comparison
ReactJS vs AngularJS - Head to Head comparison
 
React js
React jsReact js
React js
 
Introduce Flux & react in practices (KKBOX)
Introduce Flux & react in practices (KKBOX)Introduce Flux & react in practices (KKBOX)
Introduce Flux & react in practices (KKBOX)
 
Making react part of something greater
Making react part of something greaterMaking react part of something greater
Making react part of something greater
 
Introduce flux & react in practice
Introduce flux & react in practiceIntroduce flux & react in practice
Introduce flux & react in practice
 
React - Start learning today
React - Start learning today React - Start learning today
React - Start learning today
 
An Overview of the React Ecosystem
An Overview of the React EcosystemAn Overview of the React Ecosystem
An Overview of the React Ecosystem
 
Introduction to GitHub Actions - How to easily automate and integrate with Gi...
Introduction to GitHub Actions - How to easily automate and integrate with Gi...Introduction to GitHub Actions - How to easily automate and integrate with Gi...
Introduction to GitHub Actions - How to easily automate and integrate with Gi...
 
One code Web, iOS, Android
One code Web, iOS, AndroidOne code Web, iOS, Android
One code Web, iOS, Android
 
React.js at Cortex
React.js at CortexReact.js at Cortex
React.js at Cortex
 
A React Journey
A React JourneyA React Journey
A React Journey
 
Reactjs notes.pptx for web development- tutorial and theory
Reactjs  notes.pptx for web development- tutorial and theoryReactjs  notes.pptx for web development- tutorial and theory
Reactjs notes.pptx for web development- tutorial and theory
 
Building a website without a webserver on Azure
Building a website without a webserver on AzureBuilding a website without a webserver on Azure
Building a website without a webserver on Azure
 
React gsg presentation with ryan jung & elias malik
React   gsg presentation with ryan jung & elias malikReact   gsg presentation with ryan jung & elias malik
React gsg presentation with ryan jung & elias malik
 
Using redux and angular 2 with meteor
Using redux and angular 2 with meteorUsing redux and angular 2 with meteor
Using redux and angular 2 with meteor
 

Recently uploaded

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
James Anderson
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
BookNet Canada
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
Elena Simperl
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Tobias Schneck
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Albert Hoitingh
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Product School
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
Product School
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
Cheryl Hung
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
OnBoard
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
Dorra BARTAGUIZ
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
g2nightmarescribd
 

Recently uploaded (20)

Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...
 
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...Transcript: Selling digital books in 2024: Insights from industry leaders - T...
Transcript: Selling digital books in 2024: Insights from industry leaders - T...
 
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdfFIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
FIDO Alliance Osaka Seminar: FIDO Security Aspects.pdf
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 
Knowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and backKnowledge engineering: from people to machines and back
Knowledge engineering: from people to machines and back
 
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
Encryption in Microsoft 365 - ExpertsLive Netherlands 2024
 
Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...Designing Great Products: The Power of Design and Leadership by Chief Designe...
Designing Great Products: The Power of Design and Leadership by Chief Designe...
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
From Siloed Products to Connected Ecosystem: Building a Sustainable and Scala...
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
Key Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdfKey Trends Shaping the Future of Infrastructure.pdf
Key Trends Shaping the Future of Infrastructure.pdf
 
Leading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdfLeading Change strategies and insights for effective change management pdf 1.pdf
Leading Change strategies and insights for effective change management pdf 1.pdf
 
Elevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object CalisthenicsElevating Tactical DDD Patterns Through Object Calisthenics
Elevating Tactical DDD Patterns Through Object Calisthenics
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
Generating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using SmithyGenerating a custom Ruby SDK for your web service or Rails API using Smithy
Generating a custom Ruby SDK for your web service or Rails API using Smithy
 

Using redux

  • 2. Static websites Singe Page Applications complexity Refresh page LiveReload CSS time HMR (Hot Module Reload) JS (stateless components) HMR JS (everything) Redux Why Redux is natural
  • 3. Demo: Redux in use criticalcss.com
  • 4. Performance, tooling, React Penthouse - critical css generator About me @pocketjoso pocketjoso Jonas Ohlsson - front end developer https://jonassebastianohlsson.com
  • 5. • Redux - overview • criticalcss.com redux usage in practice This talk
  • 6. • Predictable State container (evolution of Flux) • One single immutable State • Reducers instead of Stores • Hot Module Reloading and Time travel • Modular, tiny (2kb!) • Follows Best practice What is Redux
  • 7. Redux vs traditional Flux Action Reducer (Redux) Store ViewRedux Flux Data flow
  • 8. Today’s example • Dispatch action for new generate job • Update State via reducer • Receive State in Component
  • 9. Action creatorAction Reducer Store View • Returns actions; does not dispatch them
  • 10. • Write reducers instead of Stores • Pure functions • (state, action) => newState https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/Reduce Reducers
  • 13. Provider Connect ViewAction Reducer Store Redux using react-redux Data flow with react-redux
  • 14. (Store) Provider • Wraps whole App Provider • Makes Store available to components Store
  • 15. ConnectConnect • Injects props, subscribes to Store • Keeps components Dumb View
  • 16. ConnectConnect View • won’t work - actionCreator does not dispatch action
  • 17. ConnectConnect View • Connect auto-injects dispatch to props
  • 18. Connect • 2nd param creates self-dispatching action functions Connect View
  • 19. • write Reducers instead of Stores • keep Components dumb using Connect • benefit from: • Hot Module Reloading • Powerful DevTools • Components easier to understand and test Summary
  • 21. Recommended packages • Redux - https://github.com/rackt/redux • React transform boilerplate (for Hot Module Reloading) - https://github.com/gaearon/react- transform-boilerplate • Redux DevTools - https://github.com/gaearon/redux-devtools Redux resources • Redux release and intro to Time travel - https://www.youtube.com/watch?v=xsSnOQynTHs • Best starting point for understanding redux - Free video tutorial on Redux by Dan Abramov (creator) - https://egghead.io/lessons/javascript-redux-the-single-immutable-state-tree • Written notes for above video tutorial - https://gist.github.com/diegoconcha/ 8918294bb9df69876b22 • Official docs (great) - http://rackt.org/redux/index.html • Redux slim in a gist - https://gist.github.com/gaearon/ffd88b0e4f00b22c3159 Resources
  • 22. Redux related resources • Full stack Redux tutorial - http://teropa.info/blog/2015/09/10/full-stack-redux-tutorial.html • Redux for state management - http://konkle.us/state-management-with-redux/ • Full stack Redux boilerplate - https://github.com/erikras/react-redux-universal-hot-example • Support for Functional Components in React Transform -https://github.com/gaearon/babel-plugin- react-transform/issues/57 • Beyond just Redux for async actions - riadbenguella.com/from-actions-creators-to-sagas-redux- upgraded Other related resources • Webpack (react docs) - https://christianalfoni.github.io/react-webpack-cookbook/index.html • Functional Stateless Components - http://tylermcginnis.com/functional-components-vs-stateless- functional-components-vs-stateless-components/ • https://medium.com/@esamatti/react-js-pure-render-performance-anti-pattern-fb88c101332f Resources