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
120
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.2k
Google I/O ’19から見る新しいJavaScript
10shi10ma
5
3.2k
Other Decks in Technology
See All in Technology
Agent 活用環境の構築・運用のための AWS サービスのご紹介/agentcore-for-building-and-operating-agents
ren8k
1
280
AI Search (Foundry IQ) におけるRAGデータの準備と配置
ryomaru0825
1
100
仕様駆動開発の、その先へ。決める力と確かめる仕組み
inariku
1
140
Oracle Database Security 詳細解説
oracle4engineer
PRO
1
170
推論基盤と Scale-Up Interconnect の現状と制約から俯瞰する技術動向
markunet
2
670
新卒エンジニア、 介護士になる
ryu1013
1
570
AIテスト自動化と評価駆動開発EDD
happysamurai294
0
110
Flutter Widget Previewerで始めるUIプレビューとVRTの自動化
sakusaku3939
0
180
Maestro MCPとClaude Code Skillsによる自律的なE2Eテスト支援
asmz
0
390
基本から分かる!AWSセキュリティ運用の考え方と任せ方
cmusudakeisuke
1
260
AI時代の開発はウォーターフォールに回帰する? / development-with-ai-back-to-wf
okamototakuyasr2
0
160
Vue で書く 空間コンピューティング、TresJS と WebXR を使ったXR デバイスのフロントエンド開発
hiranuma
0
140
Featured
See All Featured
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.8k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
2
490
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.2k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
4
1.2k
How To Speak Unicorn (iThemes Webinar)
marktimemedia
1
610
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
35
2.9k
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
750
Connecting the Dots Between Site Speed, User Experience & Your Business [WebExpo 2025]
tammyeverts
11
1.1k
Become a Pro
speakerdeck
PRO
31
6.3k
The Web Performance Landscape in 2024 [PerfNow 2024]
tammyeverts
12
1.4k
Writing Fast Ruby
sferik
630
63k
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
340
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/