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初心者がReact初めてみてReactが少しわかったときに話すお話(ハマった編)
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
ocws
March 07, 2018
Programming
13
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
React初心者がReact初めてみてReactが少しわかったときに話すお話(ハマった編)
React初心者が初心者ゆえにハマった問題を自分なりの解決策も踏まえ解説しています。
ocws
March 07, 2018
Transcript
25 slides
React初心者が React始めてみて Reactが少しわかったときに 話すお話(ハマった編) ocws presents for React初心者
自己紹介 ocws / 奥田 光輝 twitter: @o9n https://ocws.jp フリーランス /
フロントエンドエンジニア
Reactの環境 React + Redux
参照: https://qiita.com/mpyw/items/a816c6380219b1d5a3bf Reduxのフロー
ワケワカメ
1. そもそもルールがわからない
1. そもそもルールがわからない ・そもそもどうやって動いているのかがわからない ・actionを呼び出したらなんでreducerが動く? ・setStateって使っていいんだっけ? ・mapって何なんだよ。。
Reduxのフロー 参照: https://qiita.com/mpyw/items/a816c6380219b1d5a3bf
ベースをつくった こうやって理解した。 1. そもそもルールがわからない
1. そもそもルールがわからない ocws的イメージ Action Reducer Component Store Component が、Action関数 を呼び、
Action関数 が実行されると Reducer が実行され、 Reducer によって Store の情報を書き換わる。
2. コレ、React? Redux?
2. コレ、React? Redux? ・state ・props ・render ・propTypes ・Component など React組
・store ・connect ・createStore ・combineReducers など Redux組
2. コレ、React? Redux? ・map ・Spread Attributes (Spread演算子) ES2015組 {todos.map(todo =>
<Todo key={todo.id} {...todo} onClick={() => onTodoClick(todo.id)} /> )}
2. コレ、React? Redux? 慣れ こうやって理解した。
3. mapStateToPropsとmapDispatchToProps
3. mapStateToPropsとmapDispatchToProps mapStateToProps mapDispatchToProps connect
めっちゃええやつ こうやって理解した。 3. mapStateToPropsとmapDispatchToProps
3. mapStateToPropsとmapDispatchToProps mapStateToProps そのコンポーネントでpropsを追加できる道具 mapDispatchToProps そのコンポーネントでactionを即呼びできる道具
3. mapStateToPropsとmapDispatchToProps mapStateToProps そのコンポーネントでpropsを追加できる道具 props これも入れたって! A-props B-props C-props mapStateToProps
3. mapStateToPropsとmapDispatchToProps mapDispatchToProps そのコンポーネントでactionを即呼びできる道具 Compornent 孫 Action Aさん 使いたいっす。。 Action
A mapDispatchToProps Action Creator 孫コンポーネント 孫さん
3. mapStateToPropsとmapDispatchToProps connect ComponentとmapStateToPropsとmapDispatchToPropsを繋ぐ connect Component mapStateToProps mapDispatchToProps Packed!!
勉強法
勉強法 ・とりあえず、コードを書きまくる ・公式リファレンスを読む ・イベントに参加する(ハンズオンやもくもくが最適) ・ESlint ・学習動画サービスを見る(Udemy)
参照元 https://giphy.com/gifs/reaction-what-despicable-me-SqmkZ5IdwzTP2 https://giphy.com/gifs/nba-basketball-chicago-bulls-3o6YglDndxKdCNw7q8 https://giphy.com/gifs/realitytvgifs-britney-spears-confused-funny-face-JSueytO5O29yM
ご清聴ありがとうございました
Other Decks in Programming
See All in Programming
小さなアプリを作って公開するまで
onozaty
0
240
エラーチャンネルのボールを拾い続けて鍛えるエンジニアの地力 / phpcon-niigata2026
meihei3
1
500
SODA - FACT BOOK(JP)
sodainc
1
40k
AI時代のシニアエンジニアとは
yosuke_furukawa
PRO
15
12k
例外からRich Errorsまで Kotlinエラーハンドリングの進化を読み解く
shiita0903
0
240
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
140
地方こそサーバーレス — 10年続けた、顔が見えるチームで確かな基盤を / Serverless Matters Most in Regional Areas — 10 Years of Building Reliable Foundations with Close-Knit Teams
seike460
PRO
2
520
複数ドメインを一つのアプリに統合するFlutterの設計と運用_FlutterKaigi2026登壇資料(須永高弘)
takahirosunaga
0
210
Claude Codeのおかげでやりたいことがやれるようになったんだよォー!
sms_tech
0
190
プロジェクトコードをキレイキレイしよう!暗黙的な参照を読み解く静的解析
ostk0069
0
220
そのデザイントークン、Flutterでも同じ見た目になりますか?
nakamizu
0
470
AI駆動TDD ― 2026年10月版
hrmstrsmgs
0
110
Featured
See All Featured
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
Ruling the World: When Life Gets Gamed
codingconduct
0
450
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
610
Intergalactic Javascript Robots from Outer Space
tanoku
273
28k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
The browser strikes back
jonoalderson
0
2k
The Hidden Cost of Media on the Web [PixelPalooza 2025]
tammyeverts
2
590
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
640
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.8k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
The Art of Programming - Codeland 2020
erikaheidi
57
15k