More Related Content
PDF
PDF
KEY
PDF
PHP Application E2E with Capybara PDF
PPTX
PDF
PDF
ReactをRailsとどっぷり使ってみた話と、フロントエンド×AWSのこれから What's hot
PPTX
PPTX
PDF
PDF
PPTX
僕はどうしてAngular2をテーマに登壇することになってしまったのか PPTX
PPTX
PDF
PPTX
PDF
Casper js エスキュービズム勉強会0718 PDF
React Redux Redux-Saga + サーバサイドレンダリング PDF
About SnapKit - Open source lab - PDF
SIROK技術勉強会 #1 「Reactってなんだ?」 PDF
PDF
Service workerとwebプッシュ通知 PDF
コンポーネント指向による、Reactのベストプラクティスとバッドプラクティス PDF
PDF
なぜ人は必死でjQueryを捨てようとしているのか PDF
サーバサイドエンジニアが 1年間まじめにSPAやってみた PDF
Similar to kichijyojipm17-Riot20190301
PDF
Riot.js と戦った話 (8月26日 oRo LT 会) PDF
Riot + generator で始める新しいデータバインディング PPTX
Riot.jsを用いたweb開発 takusuta tech conf #1 PPTX
キャッチアップJavaScriptビルド -ビルドから見るJSの今/2016春 PDF
Frontend Fantasy 〜ミスリルの戦士たち〜 PDF
Realm,rx swift,repro を使ってみて PPTX
PDF
図とコード例で多分わかる React と flux (工事中) PDF
PPTX
PDF
PPTX
PDF
yui-frameworks cloundservice-2010-06-13 kichijyojipm17-Riot20190301
- 1.
- 2.
- 3.
使用してきたフレームワーク
• React.js
– 非常に衝撃的なインパクトがあった。
–React.js, Flux, CofeeScriptで試作したメモ
https://qiita.com/mikeshimura/items/ccc225f2fc64f20fe656
– Typescript React 簡易 Redux ( redux, react-redux ライブラリ 使用せ
ず)
https://qiita.com/mikeshimura/items/6671f1ded7d811802f34
– 超簡単 Reactjs もうflux、store、reduxで悩まなくても良い。onChange
のhandlerも記述不要。
https://qiita.com/mikeshimura/items/178d71e0412d377acf36
- 4.
- 5.
- 6.
- 7.
私製効率化ライブラリ
• 先日吉祥寺pmで発表したJava Desktop,Go
Desktopでも使用している共通ライブラリ
• Input Text,Check Box,Radio Box,Select等の
Handlerを Name属性から自動的に実行する
ことで個別Program不要
• tagcommon.js
• https://github.com/mikeshimura/javadesktop
• https://github.com/mikeshimura/godesktop
- 8.
Riot.js html
<!DOCTYPE htmlPUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-
transitional.dtd">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<meta charset="UTF-8">
<title>The ASIN tying system</title>
<script src="/static/js/lib/riot+compiler.js"></script>
<script src="/static/js/lib/jquery.min.js"></script>
<script src="/static/js/lib/sweetalert/sweetalert.min.js"></script>
<script src="/static/tag/tagcommon.js"></script>
<link rel="stylesheet" type="text/css" href="/static/css/bootstrap.css">
<link rel="stylesheet" type="text/css" href="/static/css/sweetalert.css">
<link rel="stylesheet" type="text/css" href="/static/css/project.css">
</head>
<body onunload="$wa.unload()">
<content></content>
<script type="riot/tag" data-src="/static/tag/index.tag"></script>
<script>riot.mount('content') ;riot.update()</script>
</body>
</html>
- 9.
Input Text Sample
<inputtype="text" style={ "width:100px;margin-
left:20px;"} name="test" value={$ws.test}
onchange={$c.onChange}>
- 10.
onChange(例)
$c.onChange = function(e) {
var state = $w.app.state;
var names = e.target.name.split("#")
switch (names.length) {
case 1:
state[names[0]] = e.target.value
break;
case 2:
state[names[0]][names[1]] = e.target.value
break;
case 3:
state[names[0]][names[1]][names[2]] = e.target.value
break;
case 4:
state[names[0]][names[1]][names[2]][names[3]] = e.target.value
break;
default:
console.error("name length over")
}
this.update()
return true
};
- 11.
Check Box Sample
<inputtype="checkbox"
style={ "width:20px;margin-left:20px;" }
name="setting#test"
checked={$ws.setting.test}
onchange={$c.onChecked} >
<span style="margin-left:0px;">チェックボックス
</span>
- 12.
Radio Button Sample
<inputclass="form-check-input" type="checkbox" name="sel#1"
checked={$ws.sel=="1" }
onchange={$c.onRadioChecked}
style="width:18px;height:18px;margin-top:1px;margin-left:120px;" />
<span style="padding-top:10px;vertical-align:top">SEL1 </span>
<input class="form-check-input" type="checkbox" name="sel#2"
checked={$ws.sel=="2" }
onchange={$c.onRadioChecked}
style="width:18px;height:18px;margin-top:1px;margin-left:30px;" />
<span style="padding-top:10px;vertical-align:top">SEL2</span>
- 13.
Select Sample
<select value={$ws.testsel}name={"testsel"}
onChange={$c.onChange}
style={"margin-left:0px;margin-top:0px;"}>
<option each={c,index in $ws.testgroup}
value={c.value}
selected={c.value==$ws.testsel}>
{c.label}</option>
</select>
- 14.
- 15.
Table Sample
<table class="tabletable-bordered table-condensed wscrolltable" id="stable"
style="width:300px;margin-left:120px;"
if={$ws.setting.test}>
<thead>
<tr>
<th style={"width:150px;"}>VALUE</th>
<th style={"width:150px;"}>LABEL</th>
</tr>
</thead>
<tbody>
<tr each={c,index in $ws.testgroup}>
<td>{c.value}</td>
<td>{c.label}</td>
</tr>
</tbody>
</table>