SlideShare a Scribd company logo
“Let’s Start With
REDUX”
Cubet Seminar
Presented by “Pooja Jayaraj ”
“We help build and architect IT solutions”
About Cubet
Founded in 2007, Cubet Techno Labs
is an end-to-end SMAC (social,
mobile, analytics and cloud) consulting
company with offices at Kochi, India
and London, UK. With expertise in
insightful product strategy, well-crafted
design and proficient development for
high-end web and mobile application
technologies.
Where we stand
Visit – www.cubettech.com
What is Redux ?
Visit – www.cubettech.com
❖Predictable state container for javascript apps
❖Redux is an evolution of a concept called flux
❖Light weight implementation of flux (24 kb)
❖Redux was created by Dan Abramov around June 2015
Why Redux ?
Visit – www.cubettech.com
 One way data flow
 State is immutable
 Easily testable.
 We can write Redux apps with React, Angular, Ember, jQuery, or
vanilla JavaScript.
 Relies heavily on functional programming language
Installation
Visit – www.cubettech.com
● To install stable version, npm install --save redux
● Complementary Packages
○ npm install --save react-redux
○ npm install --save-dev redux-devtools
Using redux-devtools we can ,live code editing combined with a time
traveling debugger.
Visit – www.cubettech.com
Three Principles:
Visit – www.cubettech.com
 Action
 Reducers
 Store
Visit – www.cubettech.com
Presentational and Container
Components
Visit – www.cubettech.com
 A Presentational Component is a component that just renders
HTML
 Presentational Component does not interact with the Redux store
 Presentational Component accepts input like props from a
Container Component
 The Container Component specifies the data and state a
presentational component should render
 Container Component is the one to dispatch an action to the
Redux store
Visit – www.cubettech.com
Action
Visit – www.cubettech.com
 An action in Redux is a payload of information
 Changes are made with pure javascript functions
 Represented using json with type attribute and state object
 Action will be dispatched to a reducer
 Action Creator - it's simply a function which creates action
Example :
Visit – www.cubettech.com
dispatch(addTodo(text)) - call from component
function addTodo(text) {
return {
type: ADD_TODO,
text
}
}
Reducer:
Visit – www.cubettech.com
 Takes an action and a state, returns a new state
 (previousState, action) => newState
 Pure javascript functions
 combineReducers(reducers)
 A helper function turns an object whose values are
different reducing functions into a single reducing function
you can pass to createStore.
Example :
Visit – www.cubettech.com
function todos(state = [], action) {
switch (action.type) {
case 'ADD_TODO':
return state.concat([ action.text ])
default:
return state
}
}
Visit – www.cubettech.com
let todoApp = combineReducers({
todos,
visibleTodoFilter
})
Result:
return {
todos: nextTodos,
visibleTodoFilter: nextVisibleTodoFilter
}
Store
Visit – www.cubettech.com
A store holds the whole state tree of your application.
The only way to change the state inside it is to dispatch an action on it.
There should only be a single store in your app
Methods to interact with store
● getState()
● dispatch(action)
● subscribe(listener)
● replaceReducer(nextReducer)
Visit – www.cubettech.com
getState()
Returns the current state tree of your application.
Eg:- const myErrors = store.getState().errors;
dispatch(action)
Dispatches an action. This is the only way to trigger a state change
We can include custom middleware functions to the dispatch method of
your store
Visit – www.cubettech.com
subscribe(listener)
Adds a change listener
It will be called any time an action is dispatched
replaceReducer(nextReducer)
Advanced api
Replaces the reducer currently used by the store to calculate the
state.
Example:
Visit – www.cubettech.com
import { createStore } from 'redux'
let store = createStore(todoApp)
store.subscribe(listener)
console.log(store.getState())
Visit – www.cubettech.com
Conclusion
Visit – www.cubettech.com
 Redux is powerful for building predictable, testable maintainable
interface
 Redux makes you a better UI engineer by forcing you to handle state
changes explicitly
 Redux allows you to manage state with a minimal API but completely
predictable behaviour
Our Technologies Stack:
Server Side Application JavaScript Frameworks
Mobile App Development
Database System and Cloud
Visit – www.cubettech.com
THANKS!
ANY QUESTIONS? PLEASE GET IN TOUCH!
www.cubettech.com
Email : info@cubettech.com
Skype : cubet.se
Phone: +91 484 405 4324
Contact us:
Kemp House
160 City Road
London- EC1V2NX,
UK.info@cubettech.com
+44 2071938618
Carnival Info Park,
Unit IX-C, 9th floor PhaseIV,
Kochi, Kerala, India
info@cubettech.com
+91 484 4054324

More Related Content

PPTX
Google kubernetes Engine with Google CI/CD Implementation
PDF
Sprint 43 Review
PPTX
Google cloud infrastructure workshop
PDF
An Introduction to Redux
PDF
What's new in React
PPTX
Introduction to Serverless and Google Cloud Functions
PPTX
Kubernetes for machine learning
PPTX
Serverless GraphQL. AppSync 101
Google kubernetes Engine with Google CI/CD Implementation
Sprint 43 Review
Google cloud infrastructure workshop
An Introduction to Redux
What's new in React
Introduction to Serverless and Google Cloud Functions
Kubernetes for machine learning
Serverless GraphQL. AppSync 101

Similar to Let's start with REDUX (20)

PDF
Materi Modern React Redux Power Point.pdf
PPTX
Redux workshop
PDF
React Redux AntD and Umi js
PPTX
Getting started with Redux js
PDF
How to use redux with react hooks in react native application
PDF
An approach to responsive, realtime with Backbone.js and WebSockets
PDF
React Redux Interview Questions PDF By ScholarHat
PDF
React Redux Interview Questions PDF By ScholarHat
PPTX
React js programming concept
PPTX
Introduction to react and redux
PDF
Alphorm.com Formation Redux : Niveau Avancé
PPTX
Academy PRO: React JS. Redux & Tooling
PDF
React js
PDF
React state managmenet with Redux
PDF
Redux data flow with angular
PDF
Manage the Flux of your Web Application: Let's Redux
PPTX
downloads_introduction to redux.pptx
PDF
Building Universal Web Apps with React ForwardJS 2017
PDF
Redux with angular 2 - workshop 2016
Materi Modern React Redux Power Point.pdf
Redux workshop
React Redux AntD and Umi js
Getting started with Redux js
How to use redux with react hooks in react native application
An approach to responsive, realtime with Backbone.js and WebSockets
React Redux Interview Questions PDF By ScholarHat
React Redux Interview Questions PDF By ScholarHat
React js programming concept
Introduction to react and redux
Alphorm.com Formation Redux : Niveau Avancé
Academy PRO: React JS. Redux & Tooling
React js
React state managmenet with Redux
Redux data flow with angular
Manage the Flux of your Web Application: Let's Redux
downloads_introduction to redux.pptx
Building Universal Web Apps with React ForwardJS 2017
Redux with angular 2 - workshop 2016
Ad

More from Cubet Techno Labs (6)

PPTX
Sass_Cubet seminar
PPTX
Drupal_cubet seminar
PPTX
JMeter_ Cubet Seminar ppt
PPTX
Fabricjs ppt
PPTX
An Introduction to AngularJS End to End Testing using Protractor
PPTX
Angularjs 2
Sass_Cubet seminar
Drupal_cubet seminar
JMeter_ Cubet Seminar ppt
Fabricjs ppt
An Introduction to AngularJS End to End Testing using Protractor
Angularjs 2
Ad

Recently uploaded (20)

PDF
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Advanced methodologies resolving dimensionality complications for autism neur...
PPTX
Big Data Technologies - Introduction.pptx
PDF
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Empathic Computing: Creating Shared Understanding
PPT
Teaching material agriculture food technology
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PPTX
Cloud computing and distributed systems.
DOCX
The AUB Centre for AI in Media Proposal.docx
PDF
Encapsulation theory and applications.pdf
PDF
CIFDAQ's Market Insight: SEC Turns Pro Crypto
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Dropbox Q2 2025 Financial Results & Investor Presentation
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
Chapter 3 Spatial Domain Image Processing.pdf
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
A Presentation on Artificial Intelligence
Shreyas Phanse Resume: Experienced Backend Engineer | Java • Spring Boot • Ka...
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Advanced methodologies resolving dimensionality complications for autism neur...
Big Data Technologies - Introduction.pptx
Bridging biosciences and deep learning for revolutionary discoveries: a compr...
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Empathic Computing: Creating Shared Understanding
Teaching material agriculture food technology
Per capita expenditure prediction using model stacking based on satellite ima...
Cloud computing and distributed systems.
The AUB Centre for AI in Media Proposal.docx
Encapsulation theory and applications.pdf
CIFDAQ's Market Insight: SEC Turns Pro Crypto
Unlocking AI with Model Context Protocol (MCP)
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Dropbox Q2 2025 Financial Results & Investor Presentation
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
Chapter 3 Spatial Domain Image Processing.pdf
Spectral efficient network and resource selection model in 5G networks
A Presentation on Artificial Intelligence

Let's start with REDUX

  • 1. “Let’s Start With REDUX” Cubet Seminar Presented by “Pooja Jayaraj ” “We help build and architect IT solutions”
  • 2. About Cubet Founded in 2007, Cubet Techno Labs is an end-to-end SMAC (social, mobile, analytics and cloud) consulting company with offices at Kochi, India and London, UK. With expertise in insightful product strategy, well-crafted design and proficient development for high-end web and mobile application technologies. Where we stand Visit – www.cubettech.com
  • 3. What is Redux ? Visit – www.cubettech.com ❖Predictable state container for javascript apps ❖Redux is an evolution of a concept called flux ❖Light weight implementation of flux (24 kb) ❖Redux was created by Dan Abramov around June 2015
  • 4. Why Redux ? Visit – www.cubettech.com  One way data flow  State is immutable  Easily testable.  We can write Redux apps with React, Angular, Ember, jQuery, or vanilla JavaScript.  Relies heavily on functional programming language
  • 5. Installation Visit – www.cubettech.com ● To install stable version, npm install --save redux ● Complementary Packages ○ npm install --save react-redux ○ npm install --save-dev redux-devtools Using redux-devtools we can ,live code editing combined with a time traveling debugger.
  • 7. Three Principles: Visit – www.cubettech.com  Action  Reducers  Store
  • 9. Presentational and Container Components Visit – www.cubettech.com  A Presentational Component is a component that just renders HTML  Presentational Component does not interact with the Redux store  Presentational Component accepts input like props from a Container Component  The Container Component specifies the data and state a presentational component should render  Container Component is the one to dispatch an action to the Redux store
  • 11. Action Visit – www.cubettech.com  An action in Redux is a payload of information  Changes are made with pure javascript functions  Represented using json with type attribute and state object  Action will be dispatched to a reducer  Action Creator - it's simply a function which creates action
  • 12. Example : Visit – www.cubettech.com dispatch(addTodo(text)) - call from component function addTodo(text) { return { type: ADD_TODO, text } }
  • 13. Reducer: Visit – www.cubettech.com  Takes an action and a state, returns a new state  (previousState, action) => newState  Pure javascript functions  combineReducers(reducers)  A helper function turns an object whose values are different reducing functions into a single reducing function you can pass to createStore.
  • 14. Example : Visit – www.cubettech.com function todos(state = [], action) { switch (action.type) { case 'ADD_TODO': return state.concat([ action.text ]) default: return state } }
  • 15. Visit – www.cubettech.com let todoApp = combineReducers({ todos, visibleTodoFilter }) Result: return { todos: nextTodos, visibleTodoFilter: nextVisibleTodoFilter }
  • 16. Store Visit – www.cubettech.com A store holds the whole state tree of your application. The only way to change the state inside it is to dispatch an action on it. There should only be a single store in your app Methods to interact with store ● getState() ● dispatch(action) ● subscribe(listener) ● replaceReducer(nextReducer)
  • 17. Visit – www.cubettech.com getState() Returns the current state tree of your application. Eg:- const myErrors = store.getState().errors; dispatch(action) Dispatches an action. This is the only way to trigger a state change We can include custom middleware functions to the dispatch method of your store
  • 18. Visit – www.cubettech.com subscribe(listener) Adds a change listener It will be called any time an action is dispatched replaceReducer(nextReducer) Advanced api Replaces the reducer currently used by the store to calculate the state.
  • 19. Example: Visit – www.cubettech.com import { createStore } from 'redux' let store = createStore(todoApp) store.subscribe(listener) console.log(store.getState())
  • 21. Conclusion Visit – www.cubettech.com  Redux is powerful for building predictable, testable maintainable interface  Redux makes you a better UI engineer by forcing you to handle state changes explicitly  Redux allows you to manage state with a minimal API but completely predictable behaviour
  • 22. Our Technologies Stack: Server Side Application JavaScript Frameworks Mobile App Development Database System and Cloud Visit – www.cubettech.com
  • 23. THANKS! ANY QUESTIONS? PLEASE GET IN TOUCH! www.cubettech.com Email : info@cubettech.com Skype : cubet.se Phone: +91 484 405 4324
  • 24. Contact us: Kemp House 160 City Road London- EC1V2NX, UK.info@cubettech.com +44 2071938618 Carnival Info Park, Unit IX-C, 9th floor PhaseIV, Kochi, Kerala, India info@cubettech.com +91 484 4054324