SlideShare a Scribd company logo
7 Redux Challenges
Jan 20, 2016
Redux
Redux is a predictable state container for
JavaScript apps. It helps you write applications
that behave consistently, run in different
environments (client, server, and native), and are
easy to test. On top of that, it provides a great
developer experience, such as live code editing
combined with a time traveling debugger.
http://redux.js.org/
https://egghead.io/lessons/javascript-redux-the-single-immutable-state-tree?series=getting-started-with-redux
Redux
Predictable state container? Yes
Run in different environments (client, server, and
native)? Yes, on client and server. Not yet as you
might expect on mobile and native
Great developer experience? Yes, if you can
become familiar with ES6, WebPack, Babel, npm
tools
Redux
Live code editing is great, if you configure
WebPack with CSS Modules
Time traveling debugger … hmm … not really
important IMHO
What’s important? Your SPA app keeps its state
while you do component modifications.
Welcome to Functional Programming approach!
Functional Revolution
React.js lifecicle
Redux Challenges
Cancelling Promises, server-side (isomorphic) rendering with async calls
#1 Async programming
Research why libraries like superagent-bluebird-promise exists
https://github.com/KyleAMathews/superagent-bluebird-promise
Redux on the Server
http://rackt.org/redux/docs/recipes/ServerRendering.html
Redux Challenges
Be aware of dom mutations from libraries like D3 or jQuery
#2 Dom mutations
Wrap and isolate side effects.
Review D3 chart css and js code
Use minimum
Redux Challenges
two-way binding problem
#3 Working with url bar
If possible, avoid using react routing, rackt history, etc
Do you really need to put all app functionality in one SPA?
Can you separate user account management from main app?
Redux Challenges
componentDidMount might causing ad-hoc effects
as it dispatch actions in order to get the app to start
an operation
#4 Piggybacking componentDidMount
Generate data on server-side, not in reducer after firing from
componentDidMount
Redux Challenges
React/Redux community claims to be functional ...
OOP, classes, callbacks, etc are commonplace ...
#5 Imperative side-effects
Study Functional Programming in ES6
https://github.com/reactima/reactima-redux-ecosystem/blob/master/JS.md
Google more about JS data structures, Immutable.js …
Be aware it’s hard to get rid of old habits.
Ramda.js source code and test are great for learning. Lodash has it all!
http://ramdajs.com/
https://lodash.com/
Redux Challenges
Overhead with action creator, reducer aka "100 lines
of Redux problem”
#6 Mental Overhead
Read redux source code it!
Redux Challenges
#7 Redux Saga problem
Do you really need reactive streams?
Thank you!
Ilya Sidorov @reactima
Interested to talk?
Let’s have a skype call: ilya.sidorov
1@ilya1.com
https://www.linkedin.com/in/reactima
https://github.com/reactima/
Ad

More Related Content

What's hot (20)

Seo ppt
Seo pptSeo ppt
Seo ppt
Chandra Shekhar Joshi
 
Angular based enterprise level frontend architecture
Angular based enterprise level frontend architectureAngular based enterprise level frontend architecture
Angular based enterprise level frontend architecture
Himanshu Tamrakar
 
Getting started with typescript
Getting started with typescriptGetting started with typescript
Getting started with typescript
C...L, NESPRESSO, WAFAASSURANCE, SOFRECOM ORANGE
 
Online advertising ppc, cpm, cpc
Online advertising ppc, cpm, cpcOnline advertising ppc, cpm, cpc
Online advertising ppc, cpm, cpc
Aakaara Salon
 
Chapter 1 introduction to seo
Chapter 1   introduction to seoChapter 1   introduction to seo
Chapter 1 introduction to seo
Page Locus
 
History & Practices for UniRx(EN)
History & Practices for UniRx(EN)History & Practices for UniRx(EN)
History & Practices for UniRx(EN)
Yoshifumi Kawai
 
Introduction to WeChat
Introduction to WeChatIntroduction to WeChat
Introduction to WeChat
Juan Sanchez Bonet
 
Android Automation Testing with Selendroid
Android Automation Testing with SelendroidAndroid Automation Testing with Selendroid
Android Automation Testing with Selendroid
Vikas Thange
 
Appium Presentation
Appium Presentation Appium Presentation
Appium Presentation
OmarUsman6
 
An introduction to Search Engine Optimization (SEO) and web analytics on fao.org
An introduction to Search Engine Optimization (SEO) and web analytics on fao.orgAn introduction to Search Engine Optimization (SEO) and web analytics on fao.org
An introduction to Search Engine Optimization (SEO) and web analytics on fao.org
FAO
 
UI design for mobile apps
UI design for mobile appsUI design for mobile apps
UI design for mobile apps
Ivano Malavolta
 
Cross browser testing using BrowserStack
Cross browser testing using BrowserStack Cross browser testing using BrowserStack
Cross browser testing using BrowserStack
RapidValue
 
The Power Of Backlinks For SEO Webinar
The Power Of Backlinks For SEO WebinarThe Power Of Backlinks For SEO Webinar
The Power Of Backlinks For SEO Webinar
Bruce Jones
 
Instagram Algorithm - How to Increase Engagement on Instagram
Instagram Algorithm - How to Increase Engagement on InstagramInstagram Algorithm - How to Increase Engagement on Instagram
Instagram Algorithm - How to Increase Engagement on Instagram
Coursenvy.com
 
Mobile Application Development Services and Why We Need It?
Mobile Application Development Services and Why We Need It?Mobile Application Development Services and Why We Need It?
Mobile Application Development Services and Why We Need It?
Mobile Application Development Company
 
WebXR - Introduction and Workshop
WebXR - Introduction and WorkshopWebXR - Introduction and Workshop
WebXR - Introduction and Workshop
Timmy Kokke
 
Website performance optimization
Website performance optimizationWebsite performance optimization
Website performance optimization
Shubham Shinde
 
Mobile Apps Design Principles
Mobile Apps Design PrinciplesMobile Apps Design Principles
Mobile Apps Design Principles
Doaa El Fadally
 
Appium.pptx
Appium.pptxAppium.pptx
Appium.pptx
SameerAlam82
 
What is visual communication design? keynote
What is visual communication design? keynoteWhat is visual communication design? keynote
What is visual communication design? keynote
Paul Vickers
 
Angular based enterprise level frontend architecture
Angular based enterprise level frontend architectureAngular based enterprise level frontend architecture
Angular based enterprise level frontend architecture
Himanshu Tamrakar
 
Online advertising ppc, cpm, cpc
Online advertising ppc, cpm, cpcOnline advertising ppc, cpm, cpc
Online advertising ppc, cpm, cpc
Aakaara Salon
 
Chapter 1 introduction to seo
Chapter 1   introduction to seoChapter 1   introduction to seo
Chapter 1 introduction to seo
Page Locus
 
History & Practices for UniRx(EN)
History & Practices for UniRx(EN)History & Practices for UniRx(EN)
History & Practices for UniRx(EN)
Yoshifumi Kawai
 
Android Automation Testing with Selendroid
Android Automation Testing with SelendroidAndroid Automation Testing with Selendroid
Android Automation Testing with Selendroid
Vikas Thange
 
Appium Presentation
Appium Presentation Appium Presentation
Appium Presentation
OmarUsman6
 
An introduction to Search Engine Optimization (SEO) and web analytics on fao.org
An introduction to Search Engine Optimization (SEO) and web analytics on fao.orgAn introduction to Search Engine Optimization (SEO) and web analytics on fao.org
An introduction to Search Engine Optimization (SEO) and web analytics on fao.org
FAO
 
UI design for mobile apps
UI design for mobile appsUI design for mobile apps
UI design for mobile apps
Ivano Malavolta
 
Cross browser testing using BrowserStack
Cross browser testing using BrowserStack Cross browser testing using BrowserStack
Cross browser testing using BrowserStack
RapidValue
 
The Power Of Backlinks For SEO Webinar
The Power Of Backlinks For SEO WebinarThe Power Of Backlinks For SEO Webinar
The Power Of Backlinks For SEO Webinar
Bruce Jones
 
Instagram Algorithm - How to Increase Engagement on Instagram
Instagram Algorithm - How to Increase Engagement on InstagramInstagram Algorithm - How to Increase Engagement on Instagram
Instagram Algorithm - How to Increase Engagement on Instagram
Coursenvy.com
 
WebXR - Introduction and Workshop
WebXR - Introduction and WorkshopWebXR - Introduction and Workshop
WebXR - Introduction and Workshop
Timmy Kokke
 
Website performance optimization
Website performance optimizationWebsite performance optimization
Website performance optimization
Shubham Shinde
 
Mobile Apps Design Principles
Mobile Apps Design PrinciplesMobile Apps Design Principles
Mobile Apps Design Principles
Doaa El Fadally
 
What is visual communication design? keynote
What is visual communication design? keynoteWhat is visual communication design? keynote
What is visual communication design? keynote
Paul Vickers
 

Similar to 7 Redux challenges (20)

React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web ApplicationReact Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
adityakumar2080
 
React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)
Chiew Carol
 
Top 7 skills to look into react js developer
Top 7 skills to look into react js developerTop 7 skills to look into react js developer
Top 7 skills to look into react js developer
Katy Slemon
 
How backbone.js is different from ember.js?
How backbone.js is different from ember.js?How backbone.js is different from ember.js?
How backbone.js is different from ember.js?
SoftProdigy - We know software!
 
Vue Js vs React: Which is the Best JS Technology in 2023
Vue Js vs React: Which is the Best JS Technology in 2023Vue Js vs React: Which is the Best JS Technology in 2023
Vue Js vs React: Which is the Best JS Technology in 2023
Aman Mishra
 
JavaScript & Enterprise BED-Con 2014 Berlin German
JavaScript & Enterprise BED-Con 2014 Berlin GermanJavaScript & Enterprise BED-Con 2014 Berlin German
JavaScript & Enterprise BED-Con 2014 Berlin German
Adam Boczek
 
Review on React JS
Review on React JSReview on React JS
Review on React JS
ijtsrd
 
Learn react-js
Learn react-jsLearn react-js
Learn react-js
C...L, NESPRESSO, WAFAASSURANCE, SOFRECOM ORANGE
 
How to Hire Reactjs Developers in 2023: Factors to consider
How to Hire Reactjs Developers in 2023: Factors to considerHow to Hire Reactjs Developers in 2023: Factors to consider
How to Hire Reactjs Developers in 2023: Factors to consider
ultroNeous Technologies
 
React JS - A quick introduction tutorial
React JS - A quick introduction tutorialReact JS - A quick introduction tutorial
React JS - A quick introduction tutorial
Mohammed Fazuluddin
 
learning react
learning reactlearning react
learning react
Eueung Mulyana
 
9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose
Albiorix Technology
 
Tech Talk on ReactJS
Tech Talk on ReactJSTech Talk on ReactJS
Tech Talk on ReactJS
Atlogys Technical Consulting
 
FRONTEND DEVELOPMENT WITH REACT.JS
FRONTEND DEVELOPMENT WITH REACT.JSFRONTEND DEVELOPMENT WITH REACT.JS
FRONTEND DEVELOPMENT WITH REACT.JS
IRJET Journal
 
Reactjs Basics
Reactjs BasicsReactjs Basics
Reactjs Basics
Hamid Ghorbani
 
What is ReactJS?
What is ReactJS?What is ReactJS?
What is ReactJS?
Albiorix Technology
 
React vs. vue which framework to select and when
React vs. vue  which framework to select and when React vs. vue  which framework to select and when
React vs. vue which framework to select and when
MoonTechnolabsPvtLtd
 
Why Should You Choose ReactJS for Game Development_.pdf
Why Should You Choose ReactJS for Game Development_.pdfWhy Should You Choose ReactJS for Game Development_.pdf
Why Should You Choose ReactJS for Game Development_.pdf
ReactJS
 
React js vs react native a comparative analysis
React js vs react native a comparative analysisReact js vs react native a comparative analysis
React js vs react native a comparative analysis
Shelly Megan
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
Fwdays
 
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web ApplicationReact Js vs Node Js_ Which Framework to Choose for Your Next Web Application
React Js vs Node Js_ Which Framework to Choose for Your Next Web Application
adityakumar2080
 
React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)React Native +Redux + ES6 (Updated)
React Native +Redux + ES6 (Updated)
Chiew Carol
 
Top 7 skills to look into react js developer
Top 7 skills to look into react js developerTop 7 skills to look into react js developer
Top 7 skills to look into react js developer
Katy Slemon
 
Vue Js vs React: Which is the Best JS Technology in 2023
Vue Js vs React: Which is the Best JS Technology in 2023Vue Js vs React: Which is the Best JS Technology in 2023
Vue Js vs React: Which is the Best JS Technology in 2023
Aman Mishra
 
JavaScript & Enterprise BED-Con 2014 Berlin German
JavaScript & Enterprise BED-Con 2014 Berlin GermanJavaScript & Enterprise BED-Con 2014 Berlin German
JavaScript & Enterprise BED-Con 2014 Berlin German
Adam Boczek
 
Review on React JS
Review on React JSReview on React JS
Review on React JS
ijtsrd
 
How to Hire Reactjs Developers in 2023: Factors to consider
How to Hire Reactjs Developers in 2023: Factors to considerHow to Hire Reactjs Developers in 2023: Factors to consider
How to Hire Reactjs Developers in 2023: Factors to consider
ultroNeous Technologies
 
React JS - A quick introduction tutorial
React JS - A quick introduction tutorialReact JS - A quick introduction tutorial
React JS - A quick introduction tutorial
Mohammed Fazuluddin
 
9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose9 Best JavaScript Frameworks To Choose
9 Best JavaScript Frameworks To Choose
Albiorix Technology
 
FRONTEND DEVELOPMENT WITH REACT.JS
FRONTEND DEVELOPMENT WITH REACT.JSFRONTEND DEVELOPMENT WITH REACT.JS
FRONTEND DEVELOPMENT WITH REACT.JS
IRJET Journal
 
React vs. vue which framework to select and when
React vs. vue  which framework to select and when React vs. vue  which framework to select and when
React vs. vue which framework to select and when
MoonTechnolabsPvtLtd
 
Why Should You Choose ReactJS for Game Development_.pdf
Why Should You Choose ReactJS for Game Development_.pdfWhy Should You Choose ReactJS for Game Development_.pdf
Why Should You Choose ReactJS for Game Development_.pdf
ReactJS
 
React js vs react native a comparative analysis
React js vs react native a comparative analysisReact js vs react native a comparative analysis
React js vs react native a comparative analysis
Shelly Megan
 
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai..."Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
"Micro-frontends: Scalable and Modular Frontend in Parimatch Tech", Kyrylo Ai...
Fwdays
 
Ad

Recently uploaded (19)

Understanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep WebUnderstanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep Web
nabilajabin35
 
White and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptxWhite and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptx
canumatown
 
Perguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolhaPerguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolha
socaslev
 
DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)
APNIC
 
5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx
andani26
 
highend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptxhighend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptx
elhadjcheikhdiop
 
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation TemplateSmart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
yojeari421237
 
project_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptxproject_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptx
redzuriel13
 
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry SweetserAPNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC
 
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
DataProvider1
 
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC
 
Determining Glass is mechanical textile
Determining  Glass is mechanical textileDetermining  Glass is mechanical textile
Determining Glass is mechanical textile
Azizul Hakim
 
(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security
aluacharya169
 
Best web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you businessBest web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you business
steve198109
 
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 SupportReliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
steve198109
 
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHostingTop Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
steve198109
 
IT Services Workflow From Request to Resolution
IT Services Workflow From Request to ResolutionIT Services Workflow From Request to Resolution
IT Services Workflow From Request to Resolution
mzmziiskd
 
OSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description fOSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description f
cbr49917
 
Computers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers NetworksComputers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers Networks
Tito208863
 
Understanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep WebUnderstanding the Tor Network and Exploring the Deep Web
Understanding the Tor Network and Exploring the Deep Web
nabilajabin35
 
White and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptxWhite and Red Clean Car Business Pitch Presentation.pptx
White and Red Clean Car Business Pitch Presentation.pptx
canumatown
 
Perguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolhaPerguntas dos animais - Slides ilustrados de múltipla escolha
Perguntas dos animais - Slides ilustrados de múltipla escolha
socaslev
 
DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)DNS Resolvers and Nameservers (in New Zealand)
DNS Resolvers and Nameservers (in New Zealand)
APNIC
 
5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx5-Proses-proses Akuisisi Citra Digital.pptx
5-Proses-proses Akuisisi Citra Digital.pptx
andani26
 
highend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptxhighend-srxseries-services-gateways-customer-presentation.pptx
highend-srxseries-services-gateways-customer-presentation.pptx
elhadjcheikhdiop
 
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation TemplateSmart Mobile App Pitch Deck丨AI Travel App Presentation Template
Smart Mobile App Pitch Deck丨AI Travel App Presentation Template
yojeari421237
 
project_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptxproject_based_laaaaaaaaaaearning,kelompok 10.pptx
project_based_laaaaaaaaaaearning,kelompok 10.pptx
redzuriel13
 
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry SweetserAPNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC Update, presented at NZNOG 2025 by Terry Sweetser
APNIC
 
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...Mobile database for your company telemarketing or sms marketing campaigns. Fr...
Mobile database for your company telemarketing or sms marketing campaigns. Fr...
DataProvider1
 
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC -Policy Development Process, presented at Local APIGA Taiwan 2025
APNIC
 
Determining Glass is mechanical textile
Determining  Glass is mechanical textileDetermining  Glass is mechanical textile
Determining Glass is mechanical textile
Azizul Hakim
 
(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security(Hosting PHising Sites) for Cryptography and network security
(Hosting PHising Sites) for Cryptography and network security
aluacharya169
 
Best web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you businessBest web hosting Vancouver 2025 for you business
Best web hosting Vancouver 2025 for you business
steve198109
 
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 SupportReliable Vancouver Web Hosting with Local Servers & 24/7 Support
Reliable Vancouver Web Hosting with Local Servers & 24/7 Support
steve198109
 
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHostingTop Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
Top Vancouver Green Business Ideas for 2025 Powered by 4GoodHosting
steve198109
 
IT Services Workflow From Request to Resolution
IT Services Workflow From Request to ResolutionIT Services Workflow From Request to Resolution
IT Services Workflow From Request to Resolution
mzmziiskd
 
OSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description fOSI TCP IP Protocol Layers description f
OSI TCP IP Protocol Layers description f
cbr49917
 
Computers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers NetworksComputers Networks Computers Networks Computers Networks
Computers Networks Computers Networks Computers Networks
Tito208863
 
Ad

7 Redux challenges

  • 2. Redux Redux is a predictable state container for JavaScript apps. It helps you write applications that behave consistently, run in different environments (client, server, and native), and are easy to test. On top of that, it provides a great developer experience, such as live code editing combined with a time traveling debugger. http://redux.js.org/ https://egghead.io/lessons/javascript-redux-the-single-immutable-state-tree?series=getting-started-with-redux
  • 3. Redux Predictable state container? Yes Run in different environments (client, server, and native)? Yes, on client and server. Not yet as you might expect on mobile and native Great developer experience? Yes, if you can become familiar with ES6, WebPack, Babel, npm tools
  • 4. Redux Live code editing is great, if you configure WebPack with CSS Modules Time traveling debugger … hmm … not really important IMHO What’s important? Your SPA app keeps its state while you do component modifications. Welcome to Functional Programming approach!
  • 7. Redux Challenges Cancelling Promises, server-side (isomorphic) rendering with async calls #1 Async programming Research why libraries like superagent-bluebird-promise exists https://github.com/KyleAMathews/superagent-bluebird-promise Redux on the Server http://rackt.org/redux/docs/recipes/ServerRendering.html
  • 8. Redux Challenges Be aware of dom mutations from libraries like D3 or jQuery #2 Dom mutations Wrap and isolate side effects. Review D3 chart css and js code Use minimum
  • 9. Redux Challenges two-way binding problem #3 Working with url bar If possible, avoid using react routing, rackt history, etc Do you really need to put all app functionality in one SPA? Can you separate user account management from main app?
  • 10. Redux Challenges componentDidMount might causing ad-hoc effects as it dispatch actions in order to get the app to start an operation #4 Piggybacking componentDidMount Generate data on server-side, not in reducer after firing from componentDidMount
  • 11. Redux Challenges React/Redux community claims to be functional ... OOP, classes, callbacks, etc are commonplace ... #5 Imperative side-effects Study Functional Programming in ES6 https://github.com/reactima/reactima-redux-ecosystem/blob/master/JS.md Google more about JS data structures, Immutable.js … Be aware it’s hard to get rid of old habits. Ramda.js source code and test are great for learning. Lodash has it all! http://ramdajs.com/ https://lodash.com/
  • 12. Redux Challenges Overhead with action creator, reducer aka "100 lines of Redux problem” #6 Mental Overhead Read redux source code it!
  • 13. Redux Challenges #7 Redux Saga problem Do you really need reactive streams?
  • 14. Thank you! Ilya Sidorov @reactima Interested to talk? Let’s have a skype call: ilya.sidorov [email protected] https://www.linkedin.com/in/reactima https://github.com/reactima/