SlideShare a Scribd company logo
Introduction of RiotJS
2016/03/11 Gotanda.js #3 @mizuki_r
1
PROFILE
@mizuki_r
Twitter: @mizuki_r
Github: ry_mizuki
npm : mizuki_r
Angular, RiotJSまわりの使い手.
最近はフロントエンドのアーキテ
クチャを考えることが多い.
2
INTRODUCTION
RIOT-JS
3
hmm…
this is very difficult…
( ・ั﹏・ั)
I THOUGHT THE TALK 4
do you know Riot?
5
~Fin~
6
tell the usage of Riot
7
http://riotjs.com/ja/guide/
8
~Fin~
9
tell the spirit of Riot
10
http://riotjs.com/ja/
11
~Fin~
12
INTRODUCTION
it’s not joke!
▸ Riot is very minimum
▸ Riot is very simple
▸ Riot is very easy
▸ Riot is very casual
13
<todo>
<!-- layout -->
<h3>{ opts.title }</h3>
<ul>
<li each={ item, i in items }>{ item }</li>
</ul>
<form onsubmit={ add }>
<input>
<button>Add #{ items.length + 1 }</button>
</form>
<!-- logic -->
<script>
this.items = []
add(e) {
var input = e.target[0]
this.items.push(input.value)
input.value = ''
}
</script>
<todo>
14
VS REACT
RIOT-JS
15
http://riotjs.com/ja/compare/
16
WHY RIOT
RIOT-JS
17
WHY RIOT
why Riot
▸ easy to learn
▸ easy to use
▸ make small, summarize small
18
WHY RIOT
easy to learn
▸ lifecycle (mount, update, updated, unmount)
▸ update
▸ yield
▸ dom events
http://riotjs.com/ja/api/
19
WHY RIOT
easy to use
▸ script in html
▸ very simple usage
<todo>
<!-- layout -->
<h3>{ opts.title }</h3>
<ul>
<li each={ item, i in items }>{ item }</li>
</ul>
<form onsubmit={ add }>
<input>
<button>Add #{ items.length + 1 }</button>
</form>
<!-- logic -->
<script>
this.items = []
add(e) {
var input = e.target[0]
this.items.push(input.value)
input.value = ''
}
</script>
<todo>
<body>
<!-- place the custom tag anywhere inside the body -->
<todo></todo>
<!-- include riot.js -->
<script src="riot.min.js"></script>
<!-- include the tag -->
<script src="todo.js" type="riot/tag"></script>
<!-- mount the tag -->
<script>riot.mount('todo')</script>
</body>
20
WHY RIOT
make small
1. create html ٩(๑´3`๑)۶
2. separate tags
3. 「hum… it’s large」(´・ω・`)
4. separate tags
5. repeat 1 … 4 ٩(๑`^´๑)۶
possible to turn a lot of small cycle!!
21
WHY RIOT
sammrize small
example of using webpack.
view/app/components
├── ffp
│   ├── index.tag
│   └── style.css
├── ffp-body
│   ├── index.tag
│   ├── store.js
│   └── style.css
├── ffp-code-pretty
│   ├── index.tag
│   ├── store.js
│   └── style.css
├── ffp-header
│   ├── index.tag
│   └── style.css
├── ffp-input
│   ├── action-creator.js
│   ├── index.tag
│   └── style.css
├── ffp-loading
│   ├── index.tag
│   ├── store.js
│   └── style.css
└── ffp-result
├── index.tag
├── store.js
└── style.css
https://github.com/rymizuki/electron-
ffp/tree/master/view/app/
components
possible to separate into
component.
22
USE CASE
RIOT-JS
23
USE CASE
there is a problem also…
‣ take over all of the data on child
becomes larger,
there is danger of conflict!!!
todoList.todos => { todos }
todoList.tags.todo => { todos, name, description }
todoList.tags.todo.tags.description => { todos, name, description, content }
24
USE CASE
use case
‣ try quickly ideas
‣ make a small app
‣ when just want to write
‣ in combination with other libraries
started small,
until the scale of the moderate
25
CONCLUSION
RIOT-JS
26
CONCLUSION
Riot is awesome
‣ Riot is very minimum
‣ Riot is very simple
‣ Riot is very easy
‣ Riot is very casual
27
THANKS!
28

More Related Content

Similar to Introduction of RiotJS

Sinatraonpassenger 090419090519 Phpapp01
Sinatraonpassenger 090419090519 Phpapp01Sinatraonpassenger 090419090519 Phpapp01
Sinatraonpassenger 090419090519 Phpapp01
guestcaceba
 
Trace kernel code tips
Trace kernel code tipsTrace kernel code tips
Trace kernel code tips
Viller Hsiao
 
An intro to the JAMStack and Eleventy
An intro to the JAMStack and EleventyAn intro to the JAMStack and Eleventy
An intro to the JAMStack and Eleventy
Luciano Mammino
 
Useful Vim Plugins
Useful Vim PluginsUseful Vim Plugins
Useful Vim Plugins
anveo
 
asyncio stack for web-development
asyncio stack for web-developmentasyncio stack for web-development
asyncio stack for web-development
Misha Behersky
 
Sacándole jugo a git
Sacándole jugo a gitSacándole jugo a git
Sacándole jugo a git
Berny Cantos
 
Sinatra
SinatraSinatra
Sinatra
Chien-An Cho
 
Bfg Ploneconf Oct2008
Bfg Ploneconf Oct2008Bfg Ploneconf Oct2008
Bfg Ploneconf Oct2008
Jeffrey Clark
 
Website Performance Basics
Website Performance BasicsWebsite Performance Basics
Website Performance Basics
geku
 
The Dojo Build System
The Dojo Build SystemThe Dojo Build System
The Dojo Build System
klipstein
 
WebCamp 2016: Python. Михаил Бегерский: Использование asyncio-стека для разра...
WebCamp 2016: Python. Михаил Бегерский: Использование asyncio-стека для разра...WebCamp 2016: Python. Михаил Бегерский: Использование asyncio-стека для разра...
WebCamp 2016: Python. Михаил Бегерский: Использование asyncio-стека для разра...
WebCamp
 
Loading...git
Loading...gitLoading...git
Loading...git
Rafael García
 
Mojolicious lite
Mojolicious liteMojolicious lite
Mojolicious lite
andrefsantos
 
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Rhio Kim
 
Jquery plugin development
Jquery plugin developmentJquery plugin development
Jquery plugin development
Md. Ziaul Haq
 
He stopped using for/while loops, you won't believe what happened next!
He stopped using for/while loops, you won't believe what happened next!He stopped using for/while loops, you won't believe what happened next!
He stopped using for/while loops, you won't believe what happened next!
François-Guillaume Ribreau
 
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJRealize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Leonardo Balter
 
4 Node.js Gotchas: What your ops team needs to know
4 Node.js Gotchas: What your ops team needs to know4 Node.js Gotchas: What your ops team needs to know
4 Node.js Gotchas: What your ops team needs to know
Dynatrace
 
Build Chef development box from scratch
Build Chef development box from scratchBuild Chef development box from scratch
Build Chef development box from scratch
Simone Soldateschi
 
Metasepi team meeting #6: "Snatch-driven development"
Metasepi team meeting #6: "Snatch-driven development"Metasepi team meeting #6: "Snatch-driven development"
Metasepi team meeting #6: "Snatch-driven development"
Kiwamu Okabe
 

Similar to Introduction of RiotJS (20)

Sinatraonpassenger 090419090519 Phpapp01
Sinatraonpassenger 090419090519 Phpapp01Sinatraonpassenger 090419090519 Phpapp01
Sinatraonpassenger 090419090519 Phpapp01
 
Trace kernel code tips
Trace kernel code tipsTrace kernel code tips
Trace kernel code tips
 
An intro to the JAMStack and Eleventy
An intro to the JAMStack and EleventyAn intro to the JAMStack and Eleventy
An intro to the JAMStack and Eleventy
 
Useful Vim Plugins
Useful Vim PluginsUseful Vim Plugins
Useful Vim Plugins
 
asyncio stack for web-development
asyncio stack for web-developmentasyncio stack for web-development
asyncio stack for web-development
 
Sacándole jugo a git
Sacándole jugo a gitSacándole jugo a git
Sacándole jugo a git
 
Sinatra
SinatraSinatra
Sinatra
 
Bfg Ploneconf Oct2008
Bfg Ploneconf Oct2008Bfg Ploneconf Oct2008
Bfg Ploneconf Oct2008
 
Website Performance Basics
Website Performance BasicsWebsite Performance Basics
Website Performance Basics
 
The Dojo Build System
The Dojo Build SystemThe Dojo Build System
The Dojo Build System
 
WebCamp 2016: Python. Михаил Бегерский: Использование asyncio-стека для разра...
WebCamp 2016: Python. Михаил Бегерский: Использование asyncio-стека для разра...WebCamp 2016: Python. Михаил Бегерский: Использование asyncio-стека для разра...
WebCamp 2016: Python. Михаил Бегерский: Использование asyncio-стека для разра...
 
Loading...git
Loading...gitLoading...git
Loading...git
 
Mojolicious lite
Mojolicious liteMojolicious lite
Mojolicious lite
 
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
Node.js 기반 정적 페이지 블로그 엔진, 하루프레스
 
Jquery plugin development
Jquery plugin developmentJquery plugin development
Jquery plugin development
 
He stopped using for/while loops, you won't believe what happened next!
He stopped using for/while loops, you won't believe what happened next!He stopped using for/while loops, you won't believe what happened next!
He stopped using for/while loops, you won't believe what happened next!
 
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJRealize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
Realize mais com HTML 5 e CSS 3 - 16 EDTED - RJ
 
4 Node.js Gotchas: What your ops team needs to know
4 Node.js Gotchas: What your ops team needs to know4 Node.js Gotchas: What your ops team needs to know
4 Node.js Gotchas: What your ops team needs to know
 
Build Chef development box from scratch
Build Chef development box from scratchBuild Chef development box from scratch
Build Chef development box from scratch
 
Metasepi team meeting #6: "Snatch-driven development"
Metasepi team meeting #6: "Snatch-driven development"Metasepi team meeting #6: "Snatch-driven development"
Metasepi team meeting #6: "Snatch-driven development"
 

More from Ryo Iinuma

このすこし短い時間にLTを!
このすこし短い時間にLTを!このすこし短い時間にLTを!
このすこし短い時間にLTを!
Ryo Iinuma
 
2015年にpublishしたnpm modules
2015年にpublishしたnpm modules2015年にpublishしたnpm modules
2015年にpublishしたnpm modules
Ryo Iinuma
 
NodeJSでCLI開発を楽しくするライブラリの紹介
NodeJSでCLI開発を楽しくするライブラリの紹介NodeJSでCLI開発を楽しくするライブラリの紹介
NodeJSでCLI開発を楽しくするライブラリの紹介
Ryo Iinuma
 
AngularJSとFluxとRiotJSと
AngularJSとFluxとRiotJSとAngularJSとFluxとRiotJSと
AngularJSとFluxとRiotJSと
Ryo Iinuma
 
フロントエンドから見たWebアプリの高速化 #gotandapm
フロントエンドから見たWebアプリの高速化 #gotandapmフロントエンドから見たWebアプリの高速化 #gotandapm
フロントエンドから見たWebアプリの高速化 #gotandapm
Ryo Iinuma
 
最近のフロントエンドツールの紹介
最近のフロントエンドツールの紹介最近のフロントエンドツールの紹介
最近のフロントエンドツールの紹介
Ryo Iinuma
 

More from Ryo Iinuma (6)

このすこし短い時間にLTを!
このすこし短い時間にLTを!このすこし短い時間にLTを!
このすこし短い時間にLTを!
 
2015年にpublishしたnpm modules
2015年にpublishしたnpm modules2015年にpublishしたnpm modules
2015年にpublishしたnpm modules
 
NodeJSでCLI開発を楽しくするライブラリの紹介
NodeJSでCLI開発を楽しくするライブラリの紹介NodeJSでCLI開発を楽しくするライブラリの紹介
NodeJSでCLI開発を楽しくするライブラリの紹介
 
AngularJSとFluxとRiotJSと
AngularJSとFluxとRiotJSとAngularJSとFluxとRiotJSと
AngularJSとFluxとRiotJSと
 
フロントエンドから見たWebアプリの高速化 #gotandapm
フロントエンドから見たWebアプリの高速化 #gotandapmフロントエンドから見たWebアプリの高速化 #gotandapm
フロントエンドから見たWebアプリの高速化 #gotandapm
 
最近のフロントエンドツールの紹介
最近のフロントエンドツールの紹介最近のフロントエンドツールの紹介
最近のフロントエンドツールの紹介
 

Recently uploaded

Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
innovationoecd
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
Safe Software
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
panagenda
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
kumardaparthi1024
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
Neo4j
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
KAMESHS29
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
panagenda
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 

Recently uploaded (20)

Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
TrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy SurveyTrustArc Webinar - 2024 Global Privacy Survey
TrustArc Webinar - 2024 Global Privacy Survey
 
Presentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of GermanyPresentation of the OECD Artificial Intelligence Review of Germany
Presentation of the OECD Artificial Intelligence Review of Germany
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Essentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FMEEssentials of Automations: The Art of Triggers and Actions in FME
Essentials of Automations: The Art of Triggers and Actions in FME
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUHCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAU
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
GenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizationsGenAI Pilot Implementation in the organizations
GenAI Pilot Implementation in the organizations
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
GraphSummit Singapore | Enhancing Changi Airport Group's Passenger Experience...
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
RESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for studentsRESUME BUILDER APPLICATION Project for students
RESUME BUILDER APPLICATION Project for students
 
HCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAUHCL Notes and Domino License Cost Reduction in the World of DLAU
HCL Notes and Domino License Cost Reduction in the World of DLAU
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 

Introduction of RiotJS

  • 1. Introduction of RiotJS 2016/03/11 Gotanda.js #3 @mizuki_r 1
  • 2. PROFILE @mizuki_r Twitter: @mizuki_r Github: ry_mizuki npm : mizuki_r Angular, RiotJSまわりの使い手. 最近はフロントエンドのアーキテ クチャを考えることが多い. 2
  • 4. hmm… this is very difficult… ( ・ั﹏・ั) I THOUGHT THE TALK 4
  • 5. do you know Riot? 5
  • 7. tell the usage of Riot 7
  • 10. tell the spirit of Riot 10
  • 13. INTRODUCTION it’s not joke! ▸ Riot is very minimum ▸ Riot is very simple ▸ Riot is very easy ▸ Riot is very casual 13
  • 14. <todo> <!-- layout --> <h3>{ opts.title }</h3> <ul> <li each={ item, i in items }>{ item }</li> </ul> <form onsubmit={ add }> <input> <button>Add #{ items.length + 1 }</button> </form> <!-- logic --> <script> this.items = [] add(e) { var input = e.target[0] this.items.push(input.value) input.value = '' } </script> <todo> 14
  • 18. WHY RIOT why Riot ▸ easy to learn ▸ easy to use ▸ make small, summarize small 18
  • 19. WHY RIOT easy to learn ▸ lifecycle (mount, update, updated, unmount) ▸ update ▸ yield ▸ dom events http://riotjs.com/ja/api/ 19
  • 20. WHY RIOT easy to use ▸ script in html ▸ very simple usage <todo> <!-- layout --> <h3>{ opts.title }</h3> <ul> <li each={ item, i in items }>{ item }</li> </ul> <form onsubmit={ add }> <input> <button>Add #{ items.length + 1 }</button> </form> <!-- logic --> <script> this.items = [] add(e) { var input = e.target[0] this.items.push(input.value) input.value = '' } </script> <todo> <body> <!-- place the custom tag anywhere inside the body --> <todo></todo> <!-- include riot.js --> <script src="riot.min.js"></script> <!-- include the tag --> <script src="todo.js" type="riot/tag"></script> <!-- mount the tag --> <script>riot.mount('todo')</script> </body> 20
  • 21. WHY RIOT make small 1. create html ٩(๑´3`๑)۶ 2. separate tags 3. 「hum… it’s large」(´・ω・`) 4. separate tags 5. repeat 1 … 4 ٩(๑`^´๑)۶ possible to turn a lot of small cycle!! 21
  • 22. WHY RIOT sammrize small example of using webpack. view/app/components ├── ffp │   ├── index.tag │   └── style.css ├── ffp-body │   ├── index.tag │   ├── store.js │   └── style.css ├── ffp-code-pretty │   ├── index.tag │   ├── store.js │   └── style.css ├── ffp-header │   ├── index.tag │   └── style.css ├── ffp-input │   ├── action-creator.js │   ├── index.tag │   └── style.css ├── ffp-loading │   ├── index.tag │   ├── store.js │   └── style.css └── ffp-result ├── index.tag ├── store.js └── style.css https://github.com/rymizuki/electron- ffp/tree/master/view/app/ components possible to separate into component. 22
  • 24. USE CASE there is a problem also… ‣ take over all of the data on child becomes larger, there is danger of conflict!!! todoList.todos => { todos } todoList.tags.todo => { todos, name, description } todoList.tags.todo.tags.description => { todos, name, description, content } 24
  • 25. USE CASE use case ‣ try quickly ideas ‣ make a small app ‣ when just want to write ‣ in combination with other libraries started small, until the scale of the moderate 25
  • 27. CONCLUSION Riot is awesome ‣ Riot is very minimum ‣ Riot is very simple ‣ Riot is very easy ‣ Riot is very casual 27