Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
TypeScript+React入門
Search
rchaser53
December 19, 2016
Programming
910
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
TypeScript+React入門
rchaser53
December 19, 2016
More Decks by rchaser53
See All by rchaser53
LLVM IR入門
rchaser53
4
3k
pitch loaderについて
rchaser53
1
580
Rustからwasmを生成してみた話
rchaser53
1
820
Base64 VLQ概要
rchaser53
2
1.7k
sourcemap規格概要
rchaser53
1
1.3k
Other Decks in Programming
See All in Programming
ハーネス設計入門 〜 基礎知識の整理から実務へのステップアップ 〜
kinopeee
20
21k
App Storeの外へ──日本のiOSサイドローディング入門 for iOSDC Japan 2026
yuukiw00w
0
310
Vue Fes Japan 2026 タイムテーブル徹底解説
448jp
1
620
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
34
15k
setup-vp GitLab対応の裏側
naokihaba
0
150
RAG の “R” を Swift で覗いてみる 〜「意味から探す」検索の仕組み〜
nao_randd
0
120
Ghostty + Neovimで作る 透明でカッコ良い開発環境
j341nono
0
150
Rでドレミ/Do-Re-Mi_with_R
florets1
0
120
【加筆修正版】Laravel のアプリケーションをどこにデプロイするか #phpcon_ehime
akase244
0
150
スマートフォンでモールス信号を送受信する 〜スマートフォンのLEDとカメラで作る光通信の設計と実装〜
atsuki_seo
0
230
[Rails World 2026] Durable orchestration on Rails: from continuation to workflow
palkan
1
470
モバイル交通系ICへのチャージ実例から考える、クロスプラットフォーム開発におけるiOS実機テスト設計とCI運用
yusuga
1
580
Featured
See All Featured
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
12k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
Everyday Curiosity
cassininazir
0
340
Technical Leadership for Architectural Decision Making
baasie
3
590
Rebuilding a faster, lazier Slack
samanthasiow
85
9.7k
Navigating Algorithm Shifts & AI Overviews - #SMXNext
aleyda
1
1.6k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
320
Building AI with AI
inesmontani
PRO
1
1.3k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
510
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
570
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
710
Transcript
TypeScript + React 入門 @rchaser53
伝えたいこと 静的解析があると本当に楽 (TypeScript でもFlow でもOK) ゆるく導入してもメリットはある 少しずつ学んでいく
本日のリポジトリ 取引先のフィールドが淡々と出力されるだけのものです TypeScript で書いた際の雰囲気をお楽しみください https://github.com/rchaser53/TsxDemo
静的解析があると本当に楽 N 番煎じなので静的解析については略 補完や構文エラーが出るのは非常に便利 visual studio code 優秀 ( 好きなeditor
を使いたいならtsserver で頑張ろう)
補完機能は思ったより大事 オブジェクトの構造の把握が容易になる => 新規メンバーや臨時メンバーが入りやすい => リファクタリングもしやすい interface を充実させれば下手なドキュメントより優秀? ( エラーが出るから少なくともメンテはされる)
ゆるく導入してもメリットはある ハードルは日に日に下がっている TypeScript 2 系で設定は大分楽になった TypeScript 2.1.4 でmodule の宣言も不要に
例1. props のinterface だけでも効果あり export interface Props { name: string
label: string index: number } export class Row extends React.Component< Props, {} > { // 略 }
例2. 導入が楽なところから攻める(tsconfig 編) noUnusedLocals 使用していないローカル変数をチェックする noUnusedParameters 使用していない引数をチェックする
例2. 導入が楽なところから攻める( 型編) readonly property を読取り専用にする export interface Circle {
readonly radius: number x: number y: number } let circleA: CirCle = { radius: 10, x: 5, y: 5 } circleA.radiux = 20 // Error! circleA.x = 10 // ok
ハードルが低く効果がわかりやすい所から 体感してもらえないと導入しても使ってくれない 簡単にできて、効果が実感しやすい所から攻める やってくれる人を少しずつ増やしていく
少しずつ学んでいく 一から全部やろうとするから辛い 空いた時間で少しずつ綺麗にしていく ( ファイル、関数、オブジェクト単位で少しずつ) 最初のうちは分かる物だけ使えばよい
わかる機能から始める 非常に多機能。最初から全部は辛い 簡単なものから使っていく 特に既存プロジェクトに一気に導入するのは辛い
皆で一斉にやらなくたっていい 誰かまず始める 空き時間で型を付けたり、interface を宣言したりする (2-3 日に1 回、2-30 分くらいでも十分に効果あり) ある程度ノウハウがたまったら展開していく (
コードレビューあたりを利用)
終わりに 何事もすぐに理想の状態にはならない ちょっとずつ頑張っていく