SlideShare a Scribd company logo
1 of 19
A New Way to Build Awesome Javascript Applications
Karthick Kumar V
UI/UX Developer
Atomic IT Solutions
Twitter : @karthickvkumar
Email : karthickvelraj@live.in
+ =
React an OverviewReact an Overview
● React is a JavaScript library for creating user interfaces by Facebook
and Instagram
● It is all about building reusable components
● It creates its own virtual DOM where your components actually live.
This approach gives you enormous flexibility and amazing gains in
performance
● It uses a special syntax called JSX, which allows you to mix HTML
with JavaScripts
What is Flux?What is Flux?
● Flux is the application architecture that Facebook uses for building
client-side web applications
● Flux applications have three major parts: dispatcher, stores, views
● It is used for creating data layers in JavaScript applications
Facts on FluxFacts on Flux
● Flux is not a framework. You can’t download it
● Flux was designed by Facebook to work with React
● Flux’s uni-directional dataflow
● You can download lot’s of libraries to implement Flux such as
1.Fluxxor
2.marty.js
3.Reflux
Flux an OverviewFlux an Overview
● To best describe flux, we will compare it to one of the leading client-
side architectures: MVC
● As an MVC application the dependencies become more complex
Flux an OverviewFlux an Overview
Flux an OverviewFlux an Overview
● Flow of Flux
● The flow doesn't change significantly for additional stores or views
Flux an OverviewFlux an Overview
What is Fluxxor?What is Fluxxor?
● Fluxxor is a set of tools to facilitate building JavaScript data layers
using the Flux architecture by reifying many of the core Flux concepts
● It works particularly well in conjunction with React as the view layer
● It contains a few helpers to make integration with React applications
easier
● Fluxxor prevents cascading updates where one action triggers another
How to use with React?How to use with React?
● CommonJS: Its is distributed on npm
npm install [--save] fluxxor
● Standalone : We can include in our script
<script src="path/to/fluxxor.js"></script>
● Third-Party Releases : WebJar
"org.webjars" % "fluxxor" % fluxxorVersion
Fluxxor an OverviewFluxxor an Overview
● Fluxxor consists of three core pieces:
1. Fluxxor.Flux
2. Stores
3. Actions
● Fluxxor ships with some mixins to make it easier to use in conjunction
with React
1. Fluxxor.FluxMixin 2.Fluxxor.StoreWatchMixin
Fluxxor.Flux OverviewFluxxor.Flux Overview
● Fluxxor.Flux is the main container object for a Flux application
● It provides access to the stores and the actions
● It is responsible for managing the dispatcher internally
● We can creates a new Flux instance
new Fluxxor.Flux(stores, actions)
● stores - An object map of store names to store instances
● actions - An object map of action names to action functions
Fluxxor.Flux FunctionsFluxxor.Flux Functions
● Fluxxor.Flux#store(name) - Retrieves a store by its name
● Fluxxor.Flux#getAllStores() - Retrieves all stores
● Fluxxor.Flux#actions - Retrieves the map of actions
● Fluxxor.Flux#addStore(name, store) - Adds a new store to the Flux
instance
● Fluxxor.Flux#addStores(stores) - Adds stores to the Flux instance
● Fluxxor.Flux#addActions(actions) - Adds actions to the Flux instance
Stores an OverviewStores an Overview
● The stores are responsible for managing business logic and data
● They're same as models or collections in MVC systems, but stores may
manage more than a single piece of data
● The only way to update stores is to send them an action by way of the
dispatcher
● It does not have methods or properties that allow users to manipulate
the store directly
Store FunctionsStore Functions
● Fluxxor.createStore(spec) - Create a new store constructor
spec: An object describing the stores
● Store#waitFor(stores, callback) - Waits for other stores to finish
dispatching the current action, executing callback afterwards
● EventEmitter methods - Stores are instances of EventEmitters, and thus
inherit all the EventEmitter methods
Actions an OverviewActions an Overview
● Actions are simply combinations of a string type and an object payload
● It represent the intent to perform some manipulation of the data in a
Flux application
● The only way to update stores is to send them actions
How Actions works?How Actions works?
● Flux constructor takes an object with function values
● These functions can call this.dispatch(type, payload) to dispatch an
action to the dispatcher
Fluxxor.FluxMixin an OverviewFluxxor.FluxMixin an Overview
● It is a simple React mixin that provides a Flux instance available to a
component hierarchy
● FluxMixin in to a top level component, and mix in FluxMixin to any
child components
● Flux object will be available as this.getFlux() in any component using
the mixin
Fluxxor.StoreWatchMixinFluxxor.StoreWatchMixin
● It is a simple React mixin that will be watching for "change" events on
one or more stores
● Bind to "change" events for each store when the component mounts
● Unbind from "change" events when the component unmounts
● Automatically call setState with the return value of getStateFromFlux
when a store emits a "change" event

More Related Content

What's hot

Webpack presentation
Webpack presentationWebpack presentation
Webpack presentationRAHUL SHARMA
 
Building Reactive webapp with React/Flux
Building Reactive webapp with React/FluxBuilding Reactive webapp with React/Flux
Building Reactive webapp with React/FluxKeuller Magalhães
 
Introduction to React
Introduction to ReactIntroduction to React
Introduction to ReactAustin Garrod
 
ASP.NET - Building Web Application..in the right way!
ASP.NET - Building Web Application..in the right way!ASP.NET - Building Web Application..in the right way!
ASP.NET - Building Web Application..in the right way!Fioriela Bego
 
Crossant Run Modes
Crossant Run ModesCrossant Run Modes
Crossant Run ModesAjay Singh
 
Hyperfun with hyperloop - Ihor Strumetskyi
Hyperfun with hyperloop - Ihor StrumetskyiHyperfun with hyperloop - Ihor Strumetskyi
Hyperfun with hyperloop - Ihor StrumetskyiRuby Meditation
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 9...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 9... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 9...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 9...WebStackAcademy
 
Hibernate concurrency
Hibernate concurrencyHibernate concurrency
Hibernate concurrencypriyank09
 
Spring mvc
Spring mvcSpring mvc
Spring mvcHui Xie
 
Apache Cassandra Lunch #41: Cassandra on Kubernetes - Docker/Kubernetes/Helm ...
Apache Cassandra Lunch #41: Cassandra on Kubernetes - Docker/Kubernetes/Helm ...Apache Cassandra Lunch #41: Cassandra on Kubernetes - Docker/Kubernetes/Helm ...
Apache Cassandra Lunch #41: Cassandra on Kubernetes - Docker/Kubernetes/Helm ...Anant Corporation
 
Advance java session 15
Advance java session 15Advance java session 15
Advance java session 15Smita B Kumar
 
Junit in mule demo
Junit in mule demo Junit in mule demo
Junit in mule demo javeed_mhd
 
React Context API
React Context APIReact Context API
React Context APINodeXperts
 
Memphis php 01 22-13 - laravel basics
Memphis php 01 22-13 - laravel basicsMemphis php 01 22-13 - laravel basics
Memphis php 01 22-13 - laravel basicsJoe Ferguson
 
Docker Fundamentals
Docker FundamentalsDocker Fundamentals
Docker FundamentalsAnshul Patel
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...WebStackAcademy
 

What's hot (20)

Webpack presentation
Webpack presentationWebpack presentation
Webpack presentation
 
Building Reactive webapp with React/Flux
Building Reactive webapp with React/FluxBuilding Reactive webapp with React/Flux
Building Reactive webapp with React/Flux
 
Introduction to React
Introduction to ReactIntroduction to React
Introduction to React
 
ASP.NET - Building Web Application..in the right way!
ASP.NET - Building Web Application..in the right way!ASP.NET - Building Web Application..in the right way!
ASP.NET - Building Web Application..in the right way!
 
Java mule
Java muleJava mule
Java mule
 
Crossant Run Modes
Crossant Run ModesCrossant Run Modes
Crossant Run Modes
 
Hyperfun with hyperloop - Ihor Strumetskyi
Hyperfun with hyperloop - Ihor StrumetskyiHyperfun with hyperloop - Ihor Strumetskyi
Hyperfun with hyperloop - Ihor Strumetskyi
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 9...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 9... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 9...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 9...
 
Hibernate concurrency
Hibernate concurrencyHibernate concurrency
Hibernate concurrency
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
 
Apache Cassandra Lunch #41: Cassandra on Kubernetes - Docker/Kubernetes/Helm ...
Apache Cassandra Lunch #41: Cassandra on Kubernetes - Docker/Kubernetes/Helm ...Apache Cassandra Lunch #41: Cassandra on Kubernetes - Docker/Kubernetes/Helm ...
Apache Cassandra Lunch #41: Cassandra on Kubernetes - Docker/Kubernetes/Helm ...
 
Advance java session 15
Advance java session 15Advance java session 15
Advance java session 15
 
Junit in mule demo
Junit in mule demo Junit in mule demo
Junit in mule demo
 
Java concurrency
Java concurrencyJava concurrency
Java concurrency
 
React Context API
React Context APIReact Context API
React Context API
 
Memphis php 01 22-13 - laravel basics
Memphis php 01 22-13 - laravel basicsMemphis php 01 22-13 - laravel basics
Memphis php 01 22-13 - laravel basics
 
Docker Fundamentals
Docker FundamentalsDocker Fundamentals
Docker Fundamentals
 
Angular meteor presentation
Angular meteor presentationAngular meteor presentation
Angular meteor presentation
 
React hooks
React hooksReact hooks
React hooks
 
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1... Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
Web Component Development Using Servlet & JSP Technologies (EE6) - Chapter 1...
 

Similar to Fluxxor react library

Getting started with React and Redux
Getting started with React and ReduxGetting started with React and Redux
Getting started with React and ReduxPaddy Lock
 
downloads_introduction to redux.pptx
downloads_introduction to redux.pptxdownloads_introduction to redux.pptx
downloads_introduction to redux.pptxNavneetKumar111924
 
React e suas tecnologias na prática
React e suas tecnologias na práticaReact e suas tecnologias na prática
React e suas tecnologias na práticaRenan Oliveira
 
An Overview of the React Ecosystem
An Overview of the React EcosystemAn Overview of the React Ecosystem
An Overview of the React EcosystemFITC
 
Introduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptxIntroduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptxSHAIKIRFAN715544
 
Developing Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's GuideDeveloping Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's GuideMohanraj Thirumoorthy
 
Introduction to Functional Reactive Web with Clojurescript
Introduction to Functional Reactive Web with ClojurescriptIntroduction to Functional Reactive Web with Clojurescript
Introduction to Functional Reactive Web with ClojurescriptJohn Stevenson
 
Fundamental concepts of react js
Fundamental concepts of react jsFundamental concepts of react js
Fundamental concepts of react jsStephieJohn
 
Skill practical javascript diy projects
Skill practical javascript diy projectsSkill practical javascript diy projects
Skill practical javascript diy projectsSkillPracticalEdTech
 
Introduction to React JS.pptx
Introduction to React JS.pptxIntroduction to React JS.pptx
Introduction to React JS.pptxSHAIKIRFAN715544
 
Learn react by Etietop Demas
Learn react by Etietop DemasLearn react by Etietop Demas
Learn react by Etietop DemasEtietop Demas
 
GDSC NITS Presents Kickstart into ReactJS
GDSC NITS Presents Kickstart into ReactJSGDSC NITS Presents Kickstart into ReactJS
GDSC NITS Presents Kickstart into ReactJSPratik Majumdar
 
React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Previewvaluebound
 
Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]GDSC UofT Mississauga
 
[@NaukriEngineering] Flux Architecture
[@NaukriEngineering] Flux Architecture[@NaukriEngineering] Flux Architecture
[@NaukriEngineering] Flux ArchitectureNaukri.com
 
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 theoryjobinThomas54
 
REACTJS.pdf
REACTJS.pdfREACTJS.pdf
REACTJS.pdfArthyR3
 
Guide to Spring Reactive Programming using WebFlux
Guide to Spring Reactive Programming using WebFluxGuide to Spring Reactive Programming using WebFlux
Guide to Spring Reactive Programming using WebFluxInexture Solutions
 

Similar to Fluxxor react library (20)

Getting started with React and Redux
Getting started with React and ReduxGetting started with React and Redux
Getting started with React and Redux
 
downloads_introduction to redux.pptx
downloads_introduction to redux.pptxdownloads_introduction to redux.pptx
downloads_introduction to redux.pptx
 
React e suas tecnologias na prática
React e suas tecnologias na práticaReact e suas tecnologias na prática
React e suas tecnologias na prática
 
Redux workshop
Redux workshopRedux workshop
Redux workshop
 
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 ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptxIntroduction to ReactJS UI Web Dev .pptx
Introduction to ReactJS UI Web Dev .pptx
 
Developing Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's GuideDeveloping Microservices using Spring - Beginner's Guide
Developing Microservices using Spring - Beginner's Guide
 
Introduction to Functional Reactive Web with Clojurescript
Introduction to Functional Reactive Web with ClojurescriptIntroduction to Functional Reactive Web with Clojurescript
Introduction to Functional Reactive Web with Clojurescript
 
Fundamental concepts of react js
Fundamental concepts of react jsFundamental concepts of react js
Fundamental concepts of react js
 
Skill practical javascript diy projects
Skill practical javascript diy projectsSkill practical javascript diy projects
Skill practical javascript diy projects
 
Introduction to React JS.pptx
Introduction to React JS.pptxIntroduction to React JS.pptx
Introduction to React JS.pptx
 
Learn react by Etietop Demas
Learn react by Etietop DemasLearn react by Etietop Demas
Learn react by Etietop Demas
 
The Road To Redux
The Road To ReduxThe Road To Redux
The Road To Redux
 
GDSC NITS Presents Kickstart into ReactJS
GDSC NITS Presents Kickstart into ReactJSGDSC NITS Presents Kickstart into ReactJS
GDSC NITS Presents Kickstart into ReactJS
 
React JS: A Secret Preview
React JS: A Secret PreviewReact JS: A Secret Preview
React JS: A Secret Preview
 
Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]Full Stack React Workshop [CSSC x GDSC]
Full Stack React Workshop [CSSC x GDSC]
 
[@NaukriEngineering] Flux Architecture
[@NaukriEngineering] Flux Architecture[@NaukriEngineering] Flux Architecture
[@NaukriEngineering] Flux Architecture
 
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
 
REACTJS.pdf
REACTJS.pdfREACTJS.pdf
REACTJS.pdf
 
Guide to Spring Reactive Programming using WebFlux
Guide to Spring Reactive Programming using WebFluxGuide to Spring Reactive Programming using WebFlux
Guide to Spring Reactive Programming using WebFlux
 

Recently uploaded

Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxVishalSingh1417
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.MateoGardella
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxheathfieldcps1
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactdawncurless
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.pptRamjanShidvankar
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfAyushMahapatra5
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxnegromaestrong
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxAreebaZafar22
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...KokoStevan
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17Celine George
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphThiyagu K
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docxPoojaSen20
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...christianmathematics
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxVishalSingh1417
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 

Recently uploaded (20)

Unit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptxUnit-V; Pricing (Pharma Marketing Management).pptx
Unit-V; Pricing (Pharma Marketing Management).pptx
 
Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.Gardella_Mateo_IntellectualProperty.pdf.
Gardella_Mateo_IntellectualProperty.pdf.
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
The basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptxThe basics of sentences session 2pptx copy.pptx
The basics of sentences session 2pptx copy.pptx
 
Accessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impactAccessible design: Minimum effort, maximum impact
Accessible design: Minimum effort, maximum impact
 
Application orientated numerical on hev.ppt
Application orientated numerical on hev.pptApplication orientated numerical on hev.ppt
Application orientated numerical on hev.ppt
 
Class 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdfClass 11th Physics NEET formula sheet pdf
Class 11th Physics NEET formula sheet pdf
 
Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1Código Creativo y Arte de Software | Unidad 1
Código Creativo y Arte de Software | Unidad 1
 
Seal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptxSeal of Good Local Governance (SGLG) 2024Final.pptx
Seal of Good Local Governance (SGLG) 2024Final.pptx
 
ICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptxICT Role in 21st Century Education & its Challenges.pptx
ICT Role in 21st Century Education & its Challenges.pptx
 
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
SECOND SEMESTER TOPIC COVERAGE SY 2023-2024 Trends, Networks, and Critical Th...
 
How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17How to Give a Domain for a Field in Odoo 17
How to Give a Domain for a Field in Odoo 17
 
Z Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot GraphZ Score,T Score, Percential Rank and Box Plot Graph
Z Score,T Score, Percential Rank and Box Plot Graph
 
PROCESS RECORDING FORMAT.docx
PROCESS      RECORDING        FORMAT.docxPROCESS      RECORDING        FORMAT.docx
PROCESS RECORDING FORMAT.docx
 
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
Explore beautiful and ugly buildings. Mathematics helps us create beautiful d...
 
Unit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptxUnit-IV- Pharma. Marketing Channels.pptx
Unit-IV- Pharma. Marketing Channels.pptx
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptxINDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
INDIA QUIZ 2024 RLAC DELHI UNIVERSITY.pptx
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 

Fluxxor react library

  • 1. A New Way to Build Awesome Javascript Applications Karthick Kumar V UI/UX Developer Atomic IT Solutions Twitter : @karthickvkumar Email : karthickvelraj@live.in + =
  • 2. React an OverviewReact an Overview ● React is a JavaScript library for creating user interfaces by Facebook and Instagram ● It is all about building reusable components ● It creates its own virtual DOM where your components actually live. This approach gives you enormous flexibility and amazing gains in performance ● It uses a special syntax called JSX, which allows you to mix HTML with JavaScripts
  • 3. What is Flux?What is Flux? ● Flux is the application architecture that Facebook uses for building client-side web applications ● Flux applications have three major parts: dispatcher, stores, views ● It is used for creating data layers in JavaScript applications
  • 4. Facts on FluxFacts on Flux ● Flux is not a framework. You can’t download it ● Flux was designed by Facebook to work with React ● Flux’s uni-directional dataflow ● You can download lot’s of libraries to implement Flux such as 1.Fluxxor 2.marty.js 3.Reflux
  • 5. Flux an OverviewFlux an Overview ● To best describe flux, we will compare it to one of the leading client- side architectures: MVC ● As an MVC application the dependencies become more complex
  • 6. Flux an OverviewFlux an Overview
  • 7. Flux an OverviewFlux an Overview ● Flow of Flux ● The flow doesn't change significantly for additional stores or views
  • 8. Flux an OverviewFlux an Overview
  • 9. What is Fluxxor?What is Fluxxor? ● Fluxxor is a set of tools to facilitate building JavaScript data layers using the Flux architecture by reifying many of the core Flux concepts ● It works particularly well in conjunction with React as the view layer ● It contains a few helpers to make integration with React applications easier ● Fluxxor prevents cascading updates where one action triggers another
  • 10. How to use with React?How to use with React? ● CommonJS: Its is distributed on npm npm install [--save] fluxxor ● Standalone : We can include in our script <script src="path/to/fluxxor.js"></script> ● Third-Party Releases : WebJar "org.webjars" % "fluxxor" % fluxxorVersion
  • 11. Fluxxor an OverviewFluxxor an Overview ● Fluxxor consists of three core pieces: 1. Fluxxor.Flux 2. Stores 3. Actions ● Fluxxor ships with some mixins to make it easier to use in conjunction with React 1. Fluxxor.FluxMixin 2.Fluxxor.StoreWatchMixin
  • 12. Fluxxor.Flux OverviewFluxxor.Flux Overview ● Fluxxor.Flux is the main container object for a Flux application ● It provides access to the stores and the actions ● It is responsible for managing the dispatcher internally ● We can creates a new Flux instance new Fluxxor.Flux(stores, actions) ● stores - An object map of store names to store instances ● actions - An object map of action names to action functions
  • 13. Fluxxor.Flux FunctionsFluxxor.Flux Functions ● Fluxxor.Flux#store(name) - Retrieves a store by its name ● Fluxxor.Flux#getAllStores() - Retrieves all stores ● Fluxxor.Flux#actions - Retrieves the map of actions ● Fluxxor.Flux#addStore(name, store) - Adds a new store to the Flux instance ● Fluxxor.Flux#addStores(stores) - Adds stores to the Flux instance ● Fluxxor.Flux#addActions(actions) - Adds actions to the Flux instance
  • 14. Stores an OverviewStores an Overview ● The stores are responsible for managing business logic and data ● They're same as models or collections in MVC systems, but stores may manage more than a single piece of data ● The only way to update stores is to send them an action by way of the dispatcher ● It does not have methods or properties that allow users to manipulate the store directly
  • 15. Store FunctionsStore Functions ● Fluxxor.createStore(spec) - Create a new store constructor spec: An object describing the stores ● Store#waitFor(stores, callback) - Waits for other stores to finish dispatching the current action, executing callback afterwards ● EventEmitter methods - Stores are instances of EventEmitters, and thus inherit all the EventEmitter methods
  • 16. Actions an OverviewActions an Overview ● Actions are simply combinations of a string type and an object payload ● It represent the intent to perform some manipulation of the data in a Flux application ● The only way to update stores is to send them actions
  • 17. How Actions works?How Actions works? ● Flux constructor takes an object with function values ● These functions can call this.dispatch(type, payload) to dispatch an action to the dispatcher
  • 18. Fluxxor.FluxMixin an OverviewFluxxor.FluxMixin an Overview ● It is a simple React mixin that provides a Flux instance available to a component hierarchy ● FluxMixin in to a top level component, and mix in FluxMixin to any child components ● Flux object will be available as this.getFlux() in any component using the mixin
  • 19. Fluxxor.StoreWatchMixinFluxxor.StoreWatchMixin ● It is a simple React mixin that will be watching for "change" events on one or more stores ● Bind to "change" events for each store when the component mounts ● Unbind from "change" events when the component unmounts ● Automatically call setState with the return value of getStateFromFlux when a store emits a "change" event