SlideShare a Scribd company logo
1 of 30
Building with Flux
Phil MacCart
July 22, 2015
https://github.com/pmaccart/react-chicago-building-with-flux
© 2015 Slalom, LLC. All rights reserved. The information herein is for informational purposes only and represents the current view of Slalom, LLC. as of the date of this presentation.
SLALOM MAKES NO WARRANTIES, EXPRESS, IMPLIED, OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.
slalom.com
Topics
Flux Architectural Overview
Component Breakdown
API Integrations
Scaling out
Flux is the application architecture that Facebook
uses for building client-side web applications. It
complements React's composable view
components by utilizing a unidirectional data flow.
It's more of a pattern rather than a formal
framework.
Action
Action
StoreDispatcher View
Views
Compositions of
components
Stateless (ideally)
Data provided from
parent/root
Stores
Hold all application
state and data
Represent a domain
area
No understanding of
data presentation
Listen for events from
Dispatcher
Stores
Listen for events
from Dispatcher
Dispatcher
Singleton event bus
Sends ALL events to
interested handler
functions
Actions
Object with a type
property and data
Represent something
that happened in the
app
Created by Action
Creators
Handed to the
Dispatcher
Action
Action
StoreDispatcher View
Stateless Components
No external state
No global state
No mutable state
Views as Pure Functions
Mail App
Mail
Inbox (5)
Drafts
Deleted
MessageMessage Listing
Mail App
Folders
Drafts
DeletedInbox
Message
List
Message
Message
List Item
Message
List Item
Message
List Item
Message
List Item
Message
List Item
Mail App
Folders
Drafts
DeletedInbox
Message
List
Message
Message
List Item
Message
List Item
Message
List Item
Message
List Item
Message
List Item
API Interactions
API Interactions
Actions should be past-tense
Favor small components, but
don’t oversimplify
Pass all data as props, avoid
external state
Build stores around single
functional domain
Keep store events simple
Avoid partial state updates on
store events
Don’t send data with events
Favor all state in stores
Phil MacCart
https://github.com/pmaccart/react-chicago-building-with-flux
@pmaccart

More Related Content

What's hot

Back to [Jaspersoft] Basics: Rest API 101
Back to [Jaspersoft] Basics: Rest API 101Back to [Jaspersoft] Basics: Rest API 101
Back to [Jaspersoft] Basics: Rest API 101TIBCO Jaspersoft
 
[Jira Day 2018] Manage Jira Projects at Scale with Structure for Jira and Str...
[Jira Day 2018] Manage Jira Projects at Scale with Structure for Jira and Str...[Jira Day 2018] Manage Jira Projects at Scale with Structure for Jira and Str...
[Jira Day 2018] Manage Jira Projects at Scale with Structure for Jira and Str...Deviniti
 
Back to [Jaspersoft] Basics: Dashboards 101
Back to [Jaspersoft] Basics:  Dashboards 101Back to [Jaspersoft] Basics:  Dashboards 101
Back to [Jaspersoft] Basics: Dashboards 101TIBCO Jaspersoft
 
Back to [Jaspersoft] basics: visualize.js 101
Back to [Jaspersoft] basics: visualize.js 101Back to [Jaspersoft] basics: visualize.js 101
Back to [Jaspersoft] basics: visualize.js 101TIBCO Jaspersoft
 
Component-based Front-End architecture
Component-based Front-End architectureComponent-based Front-End architecture
Component-based Front-End architectureArtyom Trityak
 
Survey Add-on in LeanIX Enterprise Architecture Management
Survey Add-on in LeanIX Enterprise Architecture ManagementSurvey Add-on in LeanIX Enterprise Architecture Management
Survey Add-on in LeanIX Enterprise Architecture ManagementLeanIX GmbH
 
Demystifying the salesforce reports api
Demystifying the salesforce reports apiDemystifying the salesforce reports api
Demystifying the salesforce reports apiAmit Chaudhary
 
Deep dive into building apps on Common Data Service for Apps
Deep dive into building apps on Common Data Service for AppsDeep dive into building apps on Common Data Service for Apps
Deep dive into building apps on Common Data Service for AppsMicrosoft Tech Community
 
Oracle APEX Dynamic Actions
Oracle APEX Dynamic ActionsOracle APEX Dynamic Actions
Oracle APEX Dynamic ActionsAnthony Rayner
 
LeanIX GraphQL Lessons Learned - CodeTalks 2017
LeanIX GraphQL Lessons Learned - CodeTalks 2017LeanIX GraphQL Lessons Learned - CodeTalks 2017
LeanIX GraphQL Lessons Learned - CodeTalks 2017LeanIX GmbH
 

What's hot (11)

Back to [Jaspersoft] Basics: Rest API 101
Back to [Jaspersoft] Basics: Rest API 101Back to [Jaspersoft] Basics: Rest API 101
Back to [Jaspersoft] Basics: Rest API 101
 
[Jira Day 2018] Manage Jira Projects at Scale with Structure for Jira and Str...
[Jira Day 2018] Manage Jira Projects at Scale with Structure for Jira and Str...[Jira Day 2018] Manage Jira Projects at Scale with Structure for Jira and Str...
[Jira Day 2018] Manage Jira Projects at Scale with Structure for Jira and Str...
 
Back to [Jaspersoft] Basics: Dashboards 101
Back to [Jaspersoft] Basics:  Dashboards 101Back to [Jaspersoft] Basics:  Dashboards 101
Back to [Jaspersoft] Basics: Dashboards 101
 
Back to [Jaspersoft] basics: visualize.js 101
Back to [Jaspersoft] basics: visualize.js 101Back to [Jaspersoft] basics: visualize.js 101
Back to [Jaspersoft] basics: visualize.js 101
 
Component-based Front-End architecture
Component-based Front-End architectureComponent-based Front-End architecture
Component-based Front-End architecture
 
Survey Add-on in LeanIX Enterprise Architecture Management
Survey Add-on in LeanIX Enterprise Architecture ManagementSurvey Add-on in LeanIX Enterprise Architecture Management
Survey Add-on in LeanIX Enterprise Architecture Management
 
FlexCalc Introduction
FlexCalc IntroductionFlexCalc Introduction
FlexCalc Introduction
 
Demystifying the salesforce reports api
Demystifying the salesforce reports apiDemystifying the salesforce reports api
Demystifying the salesforce reports api
 
Deep dive into building apps on Common Data Service for Apps
Deep dive into building apps on Common Data Service for AppsDeep dive into building apps on Common Data Service for Apps
Deep dive into building apps on Common Data Service for Apps
 
Oracle APEX Dynamic Actions
Oracle APEX Dynamic ActionsOracle APEX Dynamic Actions
Oracle APEX Dynamic Actions
 
LeanIX GraphQL Lessons Learned - CodeTalks 2017
LeanIX GraphQL Lessons Learned - CodeTalks 2017LeanIX GraphQL Lessons Learned - CodeTalks 2017
LeanIX GraphQL Lessons Learned - CodeTalks 2017
 

Similar to Building with Flux - An Intro to the Flux Architecture

Salesforce Lightning workshop Hartford - 12 March
Salesforce Lightning workshop Hartford - 12 MarchSalesforce Lightning workshop Hartford - 12 March
Salesforce Lightning workshop Hartford - 12 MarchJitendra Zaa
 
Lightning Developer Week - Bangalore Salesforce Developer Group
Lightning Developer Week - Bangalore Salesforce Developer GroupLightning Developer Week - Bangalore Salesforce Developer Group
Lightning Developer Week - Bangalore Salesforce Developer GroupAbhilash Kuntar
 
Rits Brown Bag - Salesforce Lightning
Rits Brown Bag - Salesforce LightningRits Brown Bag - Salesforce Lightning
Rits Brown Bag - Salesforce LightningRight IT Services
 
Lightning Workshop London
Lightning Workshop LondonLightning Workshop London
Lightning Workshop LondonKeir Bowden
 
Build an Event-driven Microservices with Apache Kafka & Apache Flink with Ali...
Build an Event-driven Microservices with Apache Kafka & Apache Flink with Ali...Build an Event-driven Microservices with Apache Kafka & Apache Flink with Ali...
Build an Event-driven Microservices with Apache Kafka & Apache Flink with Ali...HostedbyConfluent
 
[WSO2Con Asia 2018] How to Build an Agile Enterprise
[WSO2Con Asia 2018] How to Build an Agile Enterprise[WSO2Con Asia 2018] How to Build an Agile Enterprise
[WSO2Con Asia 2018] How to Build an Agile EnterpriseWSO2
 
Building Composite Applications with Silverlight - Prism 2.0
Building Composite Applications with Silverlight - Prism 2.0Building Composite Applications with Silverlight - Prism 2.0
Building Composite Applications with Silverlight - Prism 2.0Christian Thilmany
 
Creating UX Applications that Target both Silverlight and WPF
Creating UX Applications that Target both Silverlight and WPFCreating UX Applications that Target both Silverlight and WPF
Creating UX Applications that Target both Silverlight and WPFChristian Thilmany
 
Lightning breakout mun world tour 2015 sfsans
Lightning breakout mun world tour 2015 sfsansLightning breakout mun world tour 2015 sfsans
Lightning breakout mun world tour 2015 sfsansSalesforce Deutschland
 
Mike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and PatternsMike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and Patternsukdpe
 
Opendelight reference-guide
Opendelight reference-guideOpendelight reference-guide
Opendelight reference-guideAshwini Rath
 
Salesforce Lightning Components and App Builder EMEA World Tour 2015
Salesforce Lightning Components and App Builder EMEA World Tour 2015Salesforce Lightning Components and App Builder EMEA World Tour 2015
Salesforce Lightning Components and App Builder EMEA World Tour 2015Peter Chittum
 
APIs: The Glue of Microservices - Introduction to the Cell-based Architecture
APIs: The Glue of Microservices - Introduction to the Cell-based ArchitectureAPIs: The Glue of Microservices - Introduction to the Cell-based Architecture
APIs: The Glue of Microservices - Introduction to the Cell-based ArchitectureWSO2
 
Suisse Romande SF DG - Lightning workshop
Suisse Romande SF DG - Lightning workshopSuisse Romande SF DG - Lightning workshop
Suisse Romande SF DG - Lightning workshopGnanasekaran Thoppae
 
Lightning Reports - Dreamforce 2015
Lightning Reports - Dreamforce 2015Lightning Reports - Dreamforce 2015
Lightning Reports - Dreamforce 2015Daniel Peter
 
From AUI to Atlaskit - Streamlining Development for Server & Cloud Apps
From AUI to Atlaskit - Streamlining Development for Server & Cloud AppsFrom AUI to Atlaskit - Streamlining Development for Server & Cloud Apps
From AUI to Atlaskit - Streamlining Development for Server & Cloud AppsAtlassian
 
Lightning Component - Components, Actions and Events
Lightning Component - Components, Actions and EventsLightning Component - Components, Actions and Events
Lightning Component - Components, Actions and EventsDurgesh Dhoot
 
Custom Reports & Integrations with GraphQL
Custom Reports & Integrations with GraphQLCustom Reports & Integrations with GraphQL
Custom Reports & Integrations with GraphQLLeanIX GmbH
 

Similar to Building with Flux - An Intro to the Flux Architecture (20)

Salesforce Lightning workshop Hartford - 12 March
Salesforce Lightning workshop Hartford - 12 MarchSalesforce Lightning workshop Hartford - 12 March
Salesforce Lightning workshop Hartford - 12 March
 
Lightning Developer Week - Bangalore Salesforce Developer Group
Lightning Developer Week - Bangalore Salesforce Developer GroupLightning Developer Week - Bangalore Salesforce Developer Group
Lightning Developer Week - Bangalore Salesforce Developer Group
 
Rits Brown Bag - Salesforce Lightning
Rits Brown Bag - Salesforce LightningRits Brown Bag - Salesforce Lightning
Rits Brown Bag - Salesforce Lightning
 
Lightning Workshop London
Lightning Workshop LondonLightning Workshop London
Lightning Workshop London
 
Salesforce Lightning workshop
Salesforce Lightning workshopSalesforce Lightning workshop
Salesforce Lightning workshop
 
Build an Event-driven Microservices with Apache Kafka & Apache Flink with Ali...
Build an Event-driven Microservices with Apache Kafka & Apache Flink with Ali...Build an Event-driven Microservices with Apache Kafka & Apache Flink with Ali...
Build an Event-driven Microservices with Apache Kafka & Apache Flink with Ali...
 
[WSO2Con Asia 2018] How to Build an Agile Enterprise
[WSO2Con Asia 2018] How to Build an Agile Enterprise[WSO2Con Asia 2018] How to Build an Agile Enterprise
[WSO2Con Asia 2018] How to Build an Agile Enterprise
 
Lightning week - Paris DUG
Lightning week - Paris DUGLightning week - Paris DUG
Lightning week - Paris DUG
 
Building Composite Applications with Silverlight - Prism 2.0
Building Composite Applications with Silverlight - Prism 2.0Building Composite Applications with Silverlight - Prism 2.0
Building Composite Applications with Silverlight - Prism 2.0
 
Creating UX Applications that Target both Silverlight and WPF
Creating UX Applications that Target both Silverlight and WPFCreating UX Applications that Target both Silverlight and WPF
Creating UX Applications that Target both Silverlight and WPF
 
Lightning breakout mun world tour 2015 sfsans
Lightning breakout mun world tour 2015 sfsansLightning breakout mun world tour 2015 sfsans
Lightning breakout mun world tour 2015 sfsans
 
Mike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and PatternsMike Taulty MIX10 Silverlight Frameworks and Patterns
Mike Taulty MIX10 Silverlight Frameworks and Patterns
 
Opendelight reference-guide
Opendelight reference-guideOpendelight reference-guide
Opendelight reference-guide
 
Salesforce Lightning Components and App Builder EMEA World Tour 2015
Salesforce Lightning Components and App Builder EMEA World Tour 2015Salesforce Lightning Components and App Builder EMEA World Tour 2015
Salesforce Lightning Components and App Builder EMEA World Tour 2015
 
APIs: The Glue of Microservices - Introduction to the Cell-based Architecture
APIs: The Glue of Microservices - Introduction to the Cell-based ArchitectureAPIs: The Glue of Microservices - Introduction to the Cell-based Architecture
APIs: The Glue of Microservices - Introduction to the Cell-based Architecture
 
Suisse Romande SF DG - Lightning workshop
Suisse Romande SF DG - Lightning workshopSuisse Romande SF DG - Lightning workshop
Suisse Romande SF DG - Lightning workshop
 
Lightning Reports - Dreamforce 2015
Lightning Reports - Dreamforce 2015Lightning Reports - Dreamforce 2015
Lightning Reports - Dreamforce 2015
 
From AUI to Atlaskit - Streamlining Development for Server & Cloud Apps
From AUI to Atlaskit - Streamlining Development for Server & Cloud AppsFrom AUI to Atlaskit - Streamlining Development for Server & Cloud Apps
From AUI to Atlaskit - Streamlining Development for Server & Cloud Apps
 
Lightning Component - Components, Actions and Events
Lightning Component - Components, Actions and EventsLightning Component - Components, Actions and Events
Lightning Component - Components, Actions and Events
 
Custom Reports & Integrations with GraphQL
Custom Reports & Integrations with GraphQLCustom Reports & Integrations with GraphQL
Custom Reports & Integrations with GraphQL
 

Recently uploaded

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfPower Karaoke
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...MyIntelliSource, Inc.
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEEVICTOR MAESTRE RAMIREZ
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...Christina Lin
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsAhmed Mohamed
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxnada99848
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - InfographicHr365.us smith
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...OnePlan Solutions
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaHanief Utama
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 

Recently uploaded (20)

Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
The Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdfThe Evolution of Karaoke From Analog to App.pdf
The Evolution of Karaoke From Analog to App.pdf
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
Steps To Getting Up And Running Quickly With MyTimeClock Employee Scheduling ...
 
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...Call Girls In Mukherjee Nagar 📱  9999965857  🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
Call Girls In Mukherjee Nagar 📱 9999965857 🤩 Delhi 🫦 HOT AND SEXY VVIP 🍎 SE...
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
Cloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEECloud Data Center Network Construction - IEEE
Cloud Data Center Network Construction - IEEE
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
ODSC - Batch to Stream workshop - integration of Apache Spark, Cassandra, Pos...
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Unveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML DiagramsUnveiling Design Patterns: A Visual Guide with UML Diagrams
Unveiling Design Patterns: A Visual Guide with UML Diagrams
 
software engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptxsoftware engineering Chapter 5 System modeling.pptx
software engineering Chapter 5 System modeling.pptx
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Asset Management Software - Infographic
Asset Management Software - InfographicAsset Management Software - Infographic
Asset Management Software - Infographic
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...Advancing Engineering with AI through the Next Generation of Strategic Projec...
Advancing Engineering with AI through the Next Generation of Strategic Projec...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
React Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief UtamaReact Server Component in Next.js by Hanief Utama
React Server Component in Next.js by Hanief Utama
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 

Building with Flux - An Intro to the Flux Architecture

Editor's Notes

  1. From the flux website Application architecture/pattern, not specific to React Complements react’s composable view
  2. Basic Flux architecture – actions come into the system from either external sources (asynchronous events) or from views Dispatcher translates actions into events, feeds them into the store, which notifies the views
  3. Views are composable Easy to write small, isolated views, then pass data down as props to child views Data shouldn’t need to flow back up
  4. Stores hold most of the business logic, along with all application data and state Each store deals with a particular problem domain -
  5. Stores listen for events fired by the dispatcher, filter over the events, and decide what to do with each event coming in
  6. Dispatcher will send ALL events to the stores that have added callbacks Stores are responsible for looking at the event types and understanding specific events they are interested in
  7. An action creator module represents an API for creating related actions.
  8. Pure functions: 1. The function always evaluates the same result value given the same argument value(s). The function result value cannot depend on any hidden information or state that may change as program execution proceeds or between different executions of the program, nor can it depend on any external input from I/O devices (usually—see below). 2. Evaluation of the result does not cause any semantically observable side effect or output, such as mutation of mutable objects or output to I/O devices (usually—see below).
  9. View component hierarchy
  10. Data connections – clicking a folder needs to update the message list - clicking a message list item needs to update both the message AND the folders view (potentially marking the item as READ)
  11. We’ve favored keeping our API requests contained within the store, particularly to assist with cases where an action may or may need need to issue an API request - example: cached data
  12. Actions represent something that HAS happened (button clicked, message sent, etc.)
  13. For items that are HTML and CSS, with no interactivity, you probably don’t need a React component Exception: HTML + CSS structure is unreasonably large
  14. Stores are singletons – don’t let views just require stores and import own data
  15. Stores can hold more than just a model or collection; they can also hold the UI state associate with the UI representations of those models
  16. Favor having an onChange and an onError event callbacks. Always refresh state of ENTIRE component when a change event is fired
  17. On changes, views should ask the store(s) for EVERY piece of data they need, rather than just the specific piece of data they think might have changed.
  18. When change events are fired from the stores, reload entire view state
  19. When in doubt, favor keeping all application state within a store. Some exceptions could exist for component-specific state (dialog position on a screen, widget size, etc.). For more complex interactions (eg: displaying a loading spinner while saving), consider firing multiple onChange events from your store.