Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Space City JS — Using Electron & React to Build N1
Search
Nylas
May 14, 2016
Programming
0
110
Space City JS — Using Electron & React to Build N1
Using Electron & React to Build N1: The Open Source Email Client
Nylas
May 14, 2016
Tweet
Share
More Decks by Nylas
See All by Nylas
Switching Off to Switch On!
nylas
1
96
Why Observability Matters
nylas
0
430
Billions of Emails Synced with Python
nylas
0
280
Profiling Python in Production
nylas
1
230
Debugging Python using GDB
nylas
0
66
Plugins with React & Challenges with Data
nylas
0
110
Waffle JS: Desktop Apps with Electron, React, & Observables
nylas
0
440
Electron, Node, and the New Desktop @ SFNode
nylas
0
330
The New Desktop: Electron, React, and Pixel-Perfect Native-Feeling Experiences — Forward 4 Web Summit
nylas
1
960
Other Decks in Programming
See All in Programming
Kanzawa.rbのLT大会を支える技術の裏側を変更する Ruby on Rails + Litestream 編
muryoimpl
0
220
JavaScriptツール群「UnJS」を5分で一気に駆け巡る!
k1tikurisu
10
1.8k
Introduction to kotlinx.rpc
arawn
0
630
DROBEの生成AI活用事例 with AWS
ippey
0
130
動作確認やテストで漏れがちな観点3選
starfish719
6
1k
SwiftUI Viewの責務分離
elmetal
PRO
0
140
2024年のWebフロントエンドのふりかえりと2025年
sakito
1
230
ASP. NET CoreにおけるWebAPIの最新情報
tomokusaba
0
360
AWS Lambda functions with C# 用の Dev Container Template を作ってみた件
mappie_kochi
0
240
負債になりにくいCSSをデザイナとつくるには?
fsubal
9
2.3k
Pulsar2 を雰囲気で使ってみよう
anoken
0
230
『GO』アプリ バックエンドサーバのコスト削減
mot_techtalk
0
130
Featured
See All Featured
Bash Introduction
62gerente
610
210k
Visualization
eitanlees
146
15k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
160
15k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
Making Projects Easy
brettharned
116
6k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Thoughts on Productivity
jonyablonski
69
4.5k
Why Our Code Smells
bkeepers
PRO
335
57k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
33
2.1k
Producing Creativity
orderedlist
PRO
343
39k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
33
2.8k
Transcript
Using Electron & React to Build N1: The Open Source
Email Client Evan Morikawa | @e0m |
[email protected]
| May 14 2016 Nylas
Standing on the shoulders of giants Evan Morikawa | @e0m
|
[email protected]
| May 14 2016 Nylas
None
None
None
None
None
How do we: Deliver to the desktop Support 3rd party
plugins Keep data & view in sync Work offline Keep it performant Pay it forward
How do we: Deliver to the desktop Support 3rd party
plugins Keep data & view in sync Work offline Keep it performant Pay it forward
None
Shell NW.js (Node Webkit) Swing | Qt | Cocoa |
GTK | WPF/WinRT
Shell
None
None
None
Chromium
Chromium Browser aka Backend aka Main Process
Chromium Browser aka Backend aka Main Process C++
Chromium Browser aka Backend aka Main Process C++ Renderer Renderer
Renderer HTML / JS (DOM) HTML / JS (DOM) HTML / JS (DOM)
Chromium Browser aka Backend aka Main Process C++ Renderer Renderer
Renderer HTML / JS (DOM) HTML / JS (DOM) HTML / JS (DOM) ipc
Browser aka Backend aka Main Process Renderer Renderer Renderer HTML
/ JS (DOM) HTML / JS (DOM) HTML / JS (DOM) ipc
Nylas N1
Nylas N1 main.js
Nylas N1 main.js const win = new BrowserWindow() win.loadURL(`file://index.html`) win.show()
Nylas N1 main.js const win = new BrowserWindow() win.loadURL(`file://index.html`) win.show()
Nylas N1 main.js const win = new BrowserWindow() win.loadURL(`file://index.html`) win.show()
index.html index.js
Nylas N1 main.js const win = new BrowserWindow() win.loadURL(`file://index.html`) win.show()
index.html index.js React.render()
Nylas N1 main.js const win = new BrowserWindow() win.loadURL(`file://index.html`) win.show()
index.html index.js React.render()
Nylas N1 main.js const win = new BrowserWindow() win.loadURL(`file://index.html`) win.show()
index.html index.js React.render() Composer Work Window
None
How do we: Deliver to the desktop Support 3rd party
plugins Keep data & view in sync Work offline Keep it performant Pay it forward
None
None
<div id=“actions”> <SendButton draft={this.props.draft} /> <AttachFileButton draft={this.props.draft} /> <TrashButton draft={this.props.draft}
/> </div>
<div id=“actions”> <InjectedComponentSet location={‘composer-actions’} passedProps={{draft: this.props.draft}} /> </div>
<div id=“actions”> <InjectedComponentSet location={‘composer-actions’} passedProps={{draft: this.props.draft}} /> </div> Actions.registerComponent(TranslateButton, {
location:’composer-actions’ })
None
None
How do we: Deliver to the desktop Support 3rd party
plugins Keep data & view in sync Work offline Keep it performant Pay it forward
React ReactiveX.js Redux Flux +
ReactiveX.js
const q = `SELECT * FROM threads WHERE …` Rx.Observable.fromQuery(q).subscribe((threads)
=> { this.setState({threads}) })
const q = `SELECT * FROM threads WHERE …` Rx.Observable.fromQuery(q)
.filter(myFn).subscribe((threads) => { this.setState({threads}) })
const q = `SELECT * FROM threads WHERE …` Rx.Observable.fromQuery(q)
.filter(myFn) .map(mapFn).subscribe((threads) => { this.setState({threads}) })
How do we: Deliver to the desktop Support 3rd party
plugins Keep data & view in sync Work offline Keep it performant Pay it forward
Web SQL Local Storage
Web SQL Local Storage
Web SQL Local Storage
None
How do we: Deliver to the desktop Support 3rd party
plugins Keep data & view in sync Work offline Keep it performant Pay it forward
None
None
How do we: Deliver to the desktop Support 3rd party
plugins Keep data & view in sync Work offline Keep it performant Pay it forward
None
https://github.com/nylas/n1 Open Source
How do we: Deliver to the desktop Support 3rd party
plugins Keep data & view in sync Work offline Keep it performant Pay it forward
N1 Core Team @e0m @bengotow @juanstejada YOU! @karim_hamidou @jackiehluo
N1 Extended Team
Evan Morikawa | @e0m |
[email protected]
| May 2016 Thank
you Slides here