Redux
Clara Miranda García (UO264958) Daniel Rückert García (UO236405) Óscar Sánchez Campo (UO265078)
Redux Clara Miranda Garca (UO264958) Daniel Rckert Garca (UO236405) - - PowerPoint PPT Presentation
Redux Clara Miranda Garca (UO264958) Daniel Rckert Garca (UO236405) scar Snchez Campo (UO265078) 1. Introduction 2. Stakeholders 3. Components 4. Architectural style 5. Quality Attributes 6. Constraints 7. Development Aspects What is
Clara Miranda García (UO264958) Daniel Rückert García (UO236405) Óscar Sánchez Campo (UO265078)
"Redux is a predictable state container for JavaScript applications"
Why do we need a predictable state container? What is a state container? How does that fit into modern web applications?
Why do we need to use it?
Time-traveling debugger
Dan Abramov Andrew Clark
Co-authors
Open-source community
Developers
Stable software
Issues
Pull request to "next" branch
Actions
Reducers
Store
Action: (p1, p2, ...) => {type , p1, p2, ...}
Reducer: ( previousState, action ) => newState Action: (p1, p2, ...) => {type , p1, p2, ...}
Reducer: ( previousState, action ) => newState Action: (p1, p2, ...) => {type , p1, p2, ...} Store:
Based on Flux
3 Principles
Single source of truth
Store
Read-only state
Manipulated by actions, never directly!!!
Changes made with pure functions
Never change the input!!!
Predictable
Easier to debug
Easier to modify
Less error prone
Lets see what they tell us on their official website:
From this we can conclude that the quality attributes they value the most are:
Open Source Three main principles: Single source
State is read-
Changes are made with pure functions Make state mutations predictable
Written purely on TypeScript and Javascript Modular