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
920
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
TypeScript+React入門
rchaser53
December 19, 2016
Transcript
14 slides
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 分くらいでも十分に効果あり) ある程度ノウハウがたまったら展開していく (
コードレビューあたりを利用)
終わりに 何事もすぐに理想の状態にはならない ちょっとずつ頑張っていく
More Decks by rchaser53
See All by rchaser53
LLVM IR入門
rchaser53
4
3k
pitch loaderについて
rchaser53
1
590
Rustからwasmを生成してみた話
rchaser53
1
830
Base64 VLQ概要
rchaser53
2
1.8k
sourcemap規格概要
rchaser53
1
1.3k
Other Decks in Programming
See All in Programming
Growing PicoRuby's Ecosystem on ESP32
yuuu
2
150
GraphQL の onError と Nullability のこれから
quramy
0
220
SODA - FACT BOOK(EN)
sodainc
1
260
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
220
Coding with AI: How to trust the storyteller (AWS Community Day Adria, Ljubljana 2026)
slobodan
0
150
AI時代のIaC入門 〜なぜインフラをコードで管理したいのか?〜 / Introduction to IaC in the AI Era
akihisaikeda
6
1.6k
自作Discord音声botをLambda MicroVMsに移行した話 / Migrating My Discord Voice Bot to Lambda MicroVMs
akihisaikeda
1
380
Apple Intelligenceとオンデバイス時代の到来
yahir0
0
250
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
380
AI Augmentation Techniques with Liberty
ivargrimstad
1
520
Beyond Chatbots: Agentic UI with Open Standards @W-JAX 2026, München
manfredsteyer
PRO
0
120
Ruby から Emacs を操作したい
phigasui
0
360
Featured
See All Featured
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
25
2.2k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
1k
Crafting Experiences
bethany
1
450
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
690
The Language of Interfaces
destraynor
162
27k
Test your architecture with Archunit
thirion
2
2.5k
[SF Ruby Conf 2025] Rails X
palkan
3
1.5k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
77k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
610
Primal Persuasion: How to Engage the Brain for Learning That Lasts
tmiket
0
520
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.9k
A Modern Web Designer's Workflow
chriscoyier
699
190k