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
React+Storybook ことはじめ
Search
Toshihisa Tomatsu
May 27, 2019
Technology
2.6k
8
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
React+Storybook ことはじめ
React.js meetup #7 (LT会)の資料です。
https://reactjs-meetup.connpass.com/event/130682/
Toshihisa Tomatsu
May 27, 2019
More Decks by Toshihisa Tomatsu
See All by Toshihisa Tomatsu
"フロントエンドの技術"を移行する技術 / Frontend Migrations
10shi10ma
0
110
Service Workerとは、それを使ってできること / what-is-service-worker
10shi10ma
3
2k
フロントエンドのエコシステム / Frontend Ecosystem
10shi10ma
8
3.4k
Service Workerとブラウザでの通知について
10shi10ma
3
400
意外に知らないnpmと便利なCLI
10shi10ma
8
2.5k
歴史から学ぶ現代のフロントエンド
10shi10ma
17
11k
サイボウズ フロントエンドエキスパートチームとOSSの管理について
10shi10ma
0
1.2k
大規模フロントエンドの技術的負債と向き合う。
10shi10ma
5
6.1k
Google I/O ’19から見る新しいJavaScript
10shi10ma
5
3.2k
Other Decks in Technology
See All in Technology
なぜ「決定性」が 決定的に重要なのか? Durable Execution 基盤の数理的理解 #serverlessjp / ServerlessDays Tokyo 2026
ytaka23
3
930
Claude in Chrome 入門 / Introduction to Claude in Chrome
cielo1985
0
870
beyond jj: config & tools ecosystem
indirect
0
5.4k
技術的負債から考える、AI時代のエンジニアリング投資 — ビズリーチの技術的負債と向き合った経験から、変更し続けられるソフトウェアを考える/ technical-debt-con2026
visional_engineering_and_design
4
3.3k
AIエージェントの権限管理 3: Agentic RAG の Fine grained access control 編
ren8k
0
150
LLMに渡さなかった仕事
nanaism
0
1.1k
おい、エージェントを使って終わらせろ
nwiizo
2
760
Railsのように考える: See through the Master
snoozer05
PRO
4
1.2k
Azure Serverless 2026:Production-ready な AI エージェント基盤 / Azure Serverless 2026: Production-Ready AI Agent Platform
miyake
2
370
安心して変更できるWebフロントエンドの作り方
pirosikick
5
2.8k
Von-Neumann Machines, Dreams & The Futures of IT
ufried
0
110
Deployment の 先にある AI Agent 基盤 - kagent vNext、Agent Substrate、Hermes から読み解く Agent Runtime の現在地 / k8s-matsuri-2-ai-agent-platform-amsy810
masayaaoyama
4
680
Featured
See All Featured
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
WENDY [Excerpt]
tessaabrams
14
39k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Everyday Curiosity
cassininazir
0
320
Raft: Consensus for Rubyists
vanstee
142
7.7k
Paper Plane (Part 1)
katiecoart
PRO
2
11k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
700
Navigating Weather and Climate Data
rabernat
0
520
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.8k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1k
Transcript
1 React+Storybook ͜ͱ͡Ί React.js meetup #7 2019/05/27 @toshi-toma
2 About Me Toshihisa Tomatsu @toshi-toma @toshi__toma
3 ൃදͷഎܠ • ࠷ۙɺ"UPNJD DesignͷຊΛಡΈ͡Ίͯ ͦΕΛࢼͨ͢Ίʹίϯϙʔωϯτ(React+styled- componets+TypeScript)։ൃʹStorybookΛͬͯΈ·ͨ͠ • ReactͷϓϩδΣΫτͰStorybookΛ͏࣌ͷΛ͠·͢ •
खݩͰ༡ΜͩఔͳͷͰɺӡ༻͍ͯ͘͠ݟͳ͍Ͱ͢
4 • UIίϯϙʔωϯτΛΞϓϦέʔγϣϯͱಠཱͨ͠ڥͰ։ൃͰ͖ Δπʔϧ • `build-storybook`ίϚϯυͰίϯϙʔωϯτϦετͷ੩తαΠ τΛੜͰ͖ΔͷͰUIίϯϙʔωϯτΧλϩάͱͯ͠ • ελΠϧΨΠυίϯϙʔωϯτͷ༷ •
։ൃͨ͠ίϯϙʔωϯτͷڍಈΛ֬ೝ • ίϯϙʔωϯτͷςετ https://github.com/storybooks/storybook
5 Storybook React Official https://storybooks-official.netlify.com
6 React + Storybook • ಋೖܗੜίϚϯυΛ࣮ߦ͢Δ͚ͩ QBDLBHFKTPOඞཁ • npx -p
@storybook/cli sb init --type react stories/ |- index.stories.js .storybook/ |- addons.js |- config.js package.json node_modules package-lock.json package.json "scripts": { + "storybook": "start-storybook -p 6006", + "build-storybook": "build-storybook" }, "dependencies": { + "@storybook/addon-actions": "^5.0.11", + "@storybook/addon-links": "^5.0.11", + "@storybook/addons": "^5.0.11", + "@storybook/react": "^5.0.11",
7 $ npm run storybook
8 xx.story.js • ͋ͱAYYTUPSZKTAͰ4UPSZCPPLʹදࣔ͢ΔίϯϙʔωϯτΛॻ͍ ͍͚ͯͩ͘
9 With TypeScript • `$ npm i -D typescript ts-loader`
• StorybookͷϏϧυϓϩηεͰTSXΛॲཧͰ͖ΔΑ͏ʹ `.storybook/webpack.config.js`Λ࡞
10 With TypeScript • ࠓޙAYYTUPSJFTUTYAʹॻ͍͍ͯ͘ • `.storybook/config`ϑΝΠϧΛฤू • `$ npm
i -D @types/storyboook__react`
11 react-docgen-typescript-loader • TypeScript Reactίϯϙʔωϯτ͔ΒdocgenใΛੜ͢Δͨ Ίͷloader • @storybook/addon-info”ͰίϯϙʔωϯτͷPropsใΛςʔ ϒϧܗࣜͰࣗಈੜ͢Δ࣌ʹ͏ •
`npm install -D react-docgen-typescript-loader` • webpack.config.js `use: [require.resolve('ts-loader'), require.resolve(‘react-docgen-typescript-loader')],` https://github.com/strothj/react-docgen-typescript-loader
12 ಋೖָ͍͢͝ • ϝϯςେมͦ͏͚ͩͲɺಠཱͨ͠ڥͰ6*ίϯϙʔωϯτΛ։ ൃͰ͖ΔͷϝϦοτେ͖ͦ͏ ΤϯδχΞઢ • StoryΛ࡞Δͷ͕େมͳίϯϙʔωϯτͦͦઃܭ͕͓͔͠ ͍ʁ •
࠶ར༻ੑɺదͳίϯϙʔωϯτׂΛߟ͑Δ͍͍͖͔͚ͬʹͳ Δ͔
13 Thanks
14 ࢀߟϦϯΫ • https://github.com/storybooks/storybook • https://www.learnstorybook.com/ • https://storybook.js.org/docs/guides/guide-react/ • https://storybook.js.org/docs/configurations/typescript-
config/