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
TypeScript+React入門
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
rchaser53
December 19, 2016
Programming
1
880
TypeScript+React入門
rchaser53
December 19, 2016
Tweet
Share
More Decks by rchaser53
See All by rchaser53
LLVM IR入門
rchaser53
4
2.8k
pitch loaderについて
rchaser53
1
540
Rustからwasmを生成してみた話
rchaser53
1
770
Base64 VLQ概要
rchaser53
2
1.6k
sourcemap規格概要
rchaser53
1
1.2k
Other Decks in Programming
See All in Programming
AIと一緒にレガシーに向き合ってみた
nyafunta9858
0
180
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
170
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
380
AIエージェントのキホンから学ぶ「エージェンティックコーディング」実践入門
masahiro_nishimi
5
340
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
170
「ブロックテーマでは再現できない」は本当か?
inc2734
0
790
余白を設計しフロントエンド開発を 加速させる
tsukuha
7
2.1k
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
520
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
600
LLM Observabilityによる 対話型音声AIアプリケーションの安定運用
gekko0114
2
420
AtCoder Conference 2025
shindannin
0
1k
humanlayerのブログから学ぶ、良いCLAUDE.mdの書き方
tsukamoto1783
0
190
Featured
See All Featured
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
83
Joys of Absence: A Defence of Solitary Play
codingconduct
1
290
AI Search: Where Are We & What Can We Do About It?
aleyda
0
6.9k
GraphQLの誤解/rethinking-graphql
sonatard
74
11k
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
98
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
The browser strikes back
jonoalderson
0
360
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.7k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
2
930
So, you think you're a good person
axbom
PRO
2
1.9k
Ruling the World: When Life Gets Gamed
codingconduct
0
140
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 分くらいでも十分に効果あり) ある程度ノウハウがたまったら展開していく (
コードレビューあたりを利用)
終わりに 何事もすぐに理想の状態にはならない ちょっとずつ頑張っていく