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
Ajax in React with axios
Search
takanorip
November 04, 2016
Technology
0
680
Ajax in React with axios
takanorip
November 04, 2016
Tweet
Share
More Decks by takanorip
See All by takanorip
Tools for Design Engineers other than LLM in the LLM era
takanorip
1
130
Bulletproof Design System with TypeScript
takanorip
6
3.4k
Eleventy3.0 で始める爆速個人ブログ開発!
takanorip
0
140
Webフォント選定の極意!フォントの基本から最新トレンドまで徹底解説
takanorip
5
890
効果的な管理画面を デザインをするために 避けるべき5つの罠
takanorip
14
7.2k
社内管理画面のデザインもプロダクトデザイン
takanorip
4
2k
早わかり W3C Community Group
takanorip
0
490
Ubieとアクセシビリティのこれからを考える
takanorip
0
460
2023年版 デザインシステム 技術選定の勘所 - フロントエンドカンファレンス沖縄
takanorip
2
3.9k
Other Decks in Technology
See All in Technology
Navigation3でViewModelにデータを渡す方法
mikanichinose
0
220
BrainPadプログラミングコンテスト記念LT会2025_社内イベント&問題解説
brainpadpr
1
160
Snowflake Summit 2025全体振り返り / Snowflake Summit 2025 Overall Review
mtpooh
2
390
解析の定理証明実践@Lean 4
dec9ue
0
170
5min GuardDuty Extended Threat Detection EKS
takakuni
0
140
AWS アーキテクチャ作図入門/aws-architecture-diagram-101
ma2shita
29
11k
セキュリティの民主化は何故必要なのか_AWS WAF 運用の 10 の苦悩から学ぶ
yoh
1
120
TechLION vol.41~MySQLユーザ会のほうから来ました / techlion41_mysql
sakaik
0
180
AWS テクニカルサポートとエンドカスタマーの中間地点から見えるより良いサポートの活用方法
kazzpapa3
2
530
データプラットフォーム技術におけるメダリオンアーキテクチャという考え方/DataPlatformWithMedallionArchitecture
smdmts
5
630
フィンテック養成勉強会#54
finengine
0
180
Amazon S3標準/ S3 Tables/S3 Express One Zoneを使ったログ分析
shigeruoda
3
470
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
337
57k
GraphQLとの向き合い方2022年版
quramy
48
14k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
2.9k
Thoughts on Productivity
jonyablonski
69
4.7k
Agile that works and the tools we love
rasmusluckow
329
21k
VelocityConf: Rendering Performance Case Studies
addyosmani
330
24k
[RailsConf 2023] Rails as a piece of cake
palkan
55
5.6k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
3.9k
Navigating Team Friction
lara
187
15k
Automating Front-end Workflow
addyosmani
1370
200k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
The Invisible Side of Design
smashingmag
299
51k
Transcript
Ajax in React with axios @React&React Native入門者の会
自己紹介 • 大木尊紀(@takanorip) • 株式会社フォーデジットデザイン • フロントエンドエンジニア
今日話すこと
Reactで PromiseなAjaxやってみた という話
前提
React = Library (React ≠ FrameWork)
Ajaxは自前で 実装する必要がある
主な実装方法
jQuery
jQueryによる実装
Ajaxだけで使うには jQueryは重すぎ…
Promise ES2015
Promise • 非同期処理を抽象化したオブジェクト • ES2015で実装された • 書き方が統一されている • 詳しくは→JavaScript Promiseの本
axios
axios • Promise based HTTP client for the browser and
node.js • PromiseベースのHTTPクライアント • IEでもPromise使えるようになる
How To Use
How To Use 1. HFU ͰGETϦΫΤετ 2. σʔλऔಘޙʹUIFO Λ࣮ߦ 3.
Τϥʔͷ߹ DBUDI Λ࣮ߦ
ײ • jQueryʹ͘ΒͯεοΩϦ͔͚ΔͷͰخ͍͠ • JSONPରԠͯ͠ͳ͍ͷͰΫϩευϝΠϯରԠ ͢Δࡍҙ͕ඞཁ (I have decided not
to support JSONP as part of axios.) ということらしい…