SlideShare a Scribd company logo
PURELY FUNCTIONAL USER INTERFACES
Vagmi Mudumbai - @vagmi (github / twitter)
τarka λabs
τarka λabs@vagmi
@vagmi on twitter and github

CTO at @tarkalabs
I enjoy working with
τarka λabs@vagmi
An Experience Report
τarka λabs@vagmi
David Nolen / Om
τarka λabs@vagmi
‣Embrace Immutability
‣Pure Components (no side effects)
‣Tuneable for performance
τarka λabs@vagmi
τarka λabs@vagmi
React and Virtual DOM
τarka λabs@vagmi
Immutable.js
τarka λabs@vagmi
var map1 = Immutable.Map();
var map2 = map1.set('key1', 'value1');
map1 === map2 // false
τarka λabs@vagmi
let ifjs = Immutable.fromJS;
var todos = Immutable.List()
.push(ifjs({id: 1, desc: 'Kill Jeoffrey', tags: ['kings', 'landing']}))
.push(ifjs({id: 2, desc: 'Kill Cersei', tags: ['kings', 'landing']}))
.push(ifjs({id: 3, desc: 'Kill Walder Frey', done: true, tags: ['frey', 'pie']}))
.push(ifjs({id: 4, desc: 'Kill Meryn Trant', done: true, tags: ['braavos']}))
.push(ifjs({id: 5, desc: 'Kill Tywin Lannister'}))
.push(ifjs({id: 6, desc: 'Kill The Mountain'}))
.push(ifjs({id: 7, desc: 'Kill The Hound', done: true}));
τarka λabs@vagmi
Immstruct and Cursors
τarka λabs@vagmi
let tasks = todos.reduce(
(m, t) => m.set(t.get('id'), t),
Immutable.Map()
);
τarka λabs@vagmi
appState.cursor(['state', 'tasks']).update(() => tasks)
τarka λabs@vagmi
Challenges we faced
τarka λabs@vagmi
https://github.com/tarkalabs/material-todo-jsc2016
Thanks
@vagmi
@tarkalabs

More Related Content

PDF
God - Process and Task Monitoring Done Right
ODP
How to add Fixtures into your Django app with Mixer
PDF
The rise of single-page applications
KEY
Single Page Applications - Desert Code Camp 2012
PDF
Building Single Page Apps with React.JS
PDF
Functional Web Development
PPTX
ReactJS Code Impact
PPTX
Why react is different
God - Process and Task Monitoring Done Right
How to add Fixtures into your Django app with Mixer
The rise of single-page applications
Single Page Applications - Desert Code Camp 2012
Building Single Page Apps with React.JS
Functional Web Development
ReactJS Code Impact
Why react is different

Similar to Purely functional UIs (20)

PDF
From Back to Front: Rails To React Family
PDF
Immutable js reactmeetup_local_ppt
PPTX
Maintaining sanity in a large redux app
PDF
React JS & Functional Programming Principles
PPTX
ReactJS - Re-rendering pages in the age of the mutable DOM
PDF
Purifying React (with annotations)
PDF
An Intense Overview of the React Ecosystem
PDF
Workshop 19: ReactJS Introduction
PPTX
Functional programming in javascript
PDF
The Road To Redux
PPTX
component-based JavaScript library in react.pptx
PPTX
ReactJS.NET - Fast and Scalable Single Page Applications
PPTX
Immutable Libraries for React
PPTX
Adding a modern twist to legacy web applications
PPTX
React - An Introduction
PDF
Redux essentials
PDF
2018 02-22 React, Redux & Building Applications that Scale | Redux
PDF
React lecture
PDF
Building React Applications with Redux
PDF
An Introduction to React -- FED Date -- IBM Design
From Back to Front: Rails To React Family
Immutable js reactmeetup_local_ppt
Maintaining sanity in a large redux app
React JS & Functional Programming Principles
ReactJS - Re-rendering pages in the age of the mutable DOM
Purifying React (with annotations)
An Intense Overview of the React Ecosystem
Workshop 19: ReactJS Introduction
Functional programming in javascript
The Road To Redux
component-based JavaScript library in react.pptx
ReactJS.NET - Fast and Scalable Single Page Applications
Immutable Libraries for React
Adding a modern twist to legacy web applications
React - An Introduction
Redux essentials
2018 02-22 React, Redux & Building Applications that Scale | Redux
React lecture
Building React Applications with Redux
An Introduction to React -- FED Date -- IBM Design
Ad

More from Vagmi Mudumbai (10)

PDF
Bitcoin a developer's perspective
PDF
Crystal - Statically Typed Ruby
PDF
Pragmatic Functional Programming in the JS land with Clojurescript and Om
PDF
JSFoo 2014 - Building beautiful apps with Clojurescript
PDF
Real Time Analytics with Cassandra
KEY
Building Single Page Apps with Backbone.js, Coffeescript and Rails 3.1
KEY
Github - Down the Rabbit Hole
PDF
Ruby on Rails - Introduction
KEY
Introduction to JRuby
KEY
MongoDB - Introduction
Bitcoin a developer's perspective
Crystal - Statically Typed Ruby
Pragmatic Functional Programming in the JS land with Clojurescript and Om
JSFoo 2014 - Building beautiful apps with Clojurescript
Real Time Analytics with Cassandra
Building Single Page Apps with Backbone.js, Coffeescript and Rails 3.1
Github - Down the Rabbit Hole
Ruby on Rails - Introduction
Introduction to JRuby
MongoDB - Introduction
Ad

Recently uploaded (20)

PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
OMC Textile Division Presentation 2021.pptx
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PDF
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
PDF
Univ-Connecticut-ChatGPT-Presentaion.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
PPTX
A Presentation on Touch Screen Technology
PDF
Encapsulation_ Review paper, used for researhc scholars
PDF
Mushroom cultivation and it's methods.pdf
PDF
project resource management chapter-09.pdf
PPTX
SOPHOS-XG Firewall Administrator PPT.pptx
PDF
Getting Started with Data Integration: FME Form 101
PDF
DP Operators-handbook-extract for the Mautical Institute
PDF
1 - Historical Antecedents, Social Consideration.pdf
PPTX
1. Introduction to Computer Programming.pptx
PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Agricultural_Statistics_at_a_Glance_2022_0.pdf
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
A comparative study of natural language inference in Swahili using monolingua...
OMC Textile Division Presentation 2021.pptx
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
From MVP to Full-Scale Product A Startup’s Software Journey.pdf
Univ-Connecticut-ChatGPT-Presentaion.pdf
Group 1 Presentation -Planning and Decision Making .pptx
Digital-Transformation-Roadmap-for-Companies.pptx
DASA ADMISSION 2024_FirstRound_FirstRank_LastRank.pdf
A Presentation on Touch Screen Technology
Encapsulation_ Review paper, used for researhc scholars
Mushroom cultivation and it's methods.pdf
project resource management chapter-09.pdf
SOPHOS-XG Firewall Administrator PPT.pptx
Getting Started with Data Integration: FME Form 101
DP Operators-handbook-extract for the Mautical Institute
1 - Historical Antecedents, Social Consideration.pdf
1. Introduction to Computer Programming.pptx
gpt5_lecture_notes_comprehensive_20250812015547.pdf

Purely functional UIs