Submit Search
Upload
Immutable-jsことはじめ
•
Download as PPTX, PDF
•
0 likes
•
405 views
K
kazuki matsumura
Follow
We Are JavaScripters :) 第5回LT会での発表資料です。
Read less
Read more
Technology
Report
Share
Report
Share
1 of 19
Download now
Recommended
わかる LT@2
わかる LT@2
Shingo Inoue
JAWS DAYS 2017 / SORACOM UGで発表されたLTやブログを紹介しちゃうよ!!
JAWS DAYS 2017 / SORACOM UGで発表されたLTやブログを紹介しちゃうよ!!
Kohei MATSUSHITA
「移動中の仕事術とユーザーグループと私」
「移動中の仕事術とユーザーグループと私」
Kohei MATSUSHITA
OSC 2016 Nagoya - MineOSのすすめ -
OSC 2016 Nagoya - MineOSのすすめ -
roamer7038
Swiftのswitchはとってもパワフル!
Swiftのswitchはとってもパワフル!
akatsuki174
MySQL Fabricつらい
MySQL Fabricつらい
yoku0825
jTthree V3 technical preview
jTthree V3 technical preview
Masaki Yamamoto
Playで作るwebsocketサーバ
Playで作るwebsocketサーバ
ke-m kamekoopa
Recommended
わかる LT@2
わかる LT@2
Shingo Inoue
JAWS DAYS 2017 / SORACOM UGで発表されたLTやブログを紹介しちゃうよ!!
JAWS DAYS 2017 / SORACOM UGで発表されたLTやブログを紹介しちゃうよ!!
Kohei MATSUSHITA
「移動中の仕事術とユーザーグループと私」
「移動中の仕事術とユーザーグループと私」
Kohei MATSUSHITA
OSC 2016 Nagoya - MineOSのすすめ -
OSC 2016 Nagoya - MineOSのすすめ -
roamer7038
Swiftのswitchはとってもパワフル!
Swiftのswitchはとってもパワフル!
akatsuki174
MySQL Fabricつらい
MySQL Fabricつらい
yoku0825
jTthree V3 technical preview
jTthree V3 technical preview
Masaki Yamamoto
Playで作るwebsocketサーバ
Playで作るwebsocketサーバ
ke-m kamekoopa
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
More Related Content
Featured
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Marius Sescu
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Expeed Software
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
Pixeldarts
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
ThinkNow
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
marketingartwork
Skeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
Introduction to Data Science
Introduction to Data Science
Christy Abraham Joy
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
Vit Horky
The six step guide to practical project management
The six step guide to practical project management
MindGenius
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
Featured
(20)
2024 State of Marketing Report – by Hubspot
2024 State of Marketing Report – by Hubspot
Everything You Need To Know About ChatGPT
Everything You Need To Know About ChatGPT
Product Design Trends in 2024 | Teenage Engineerings
Product Design Trends in 2024 | Teenage Engineerings
How Race, Age and Gender Shape Attitudes Towards Mental Health
How Race, Age and Gender Shape Attitudes Towards Mental Health
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
AI Trends in Creative Operations 2024 by Artwork Flow.pdf
Skeleton Culture Code
Skeleton Culture Code
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Getting into the tech field. what next
Getting into the tech field. what next
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
How to have difficult conversations
How to have difficult conversations
Introduction to Data Science
Introduction to Data Science
Time Management & Productivity - Best Practices
Time Management & Productivity - Best Practices
The six step guide to practical project management
The six step guide to practical project management
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Immutable-jsことはじめ
1.
immutable-js ことはじめ K.Matsumura (@zuckey_17) We
are JavaScripters! :)) @5th 2017.03.27
2.
簡単に自己紹介 ファストメディア株式会社 所属 フロントエンドとサーバーサイド React +
Reduxで現行の管理画面をリプレース中 immutable-jsは主にReduxの部分で利用 松村 和輝 (@zuckey_17)
3.
4.
(主に)こんな人に向けて話します • ES6普段書いてるけどもっと安心して書きたい • Reactとか使ってないんだけど自分に関係あるの?
5.
こんなことは話しません • ES6の文法の細かいところ • immutableとReact
+ Reduxとの関係性
6.
import ※以降のコードでは省略します
7.
fromJS と toJS
8.
get と set ネストしている場合は 第一引数が配列もしくはImmutable.Listでアクセス可能
9.
10.
const の罠 • 破壊的なメソッドで変更される •
プロパティへの値の代入は可能 コードが大きくなるとどんどん不安になるので immutable-jsを使ってそれを防止します
11.
Immutable.List
12.
Immutable.List
13.
Immutable.Map
14.
Immutable.Map
15.
Immutable.Record • デフォルト値を表すオブジェクトを引数として コンストラクタ関数を返す関数 • ’.’
でプロパティにアクセスできる • setで変更済みの新しいオブジェクトを返す • デフォルト値で設定した値以外は受け付けない
16.
constructorにないプロパティにも値を 入れることができる
17.
18.
まとめ • 名前の通りimmutable(不変)なオブジェクトによって 安心してコーディングができる • 他にも多くの便利なメソッドがある •
素のJavaScriptと同じ書き方で違う挙動になることが あるのでデザイナーの方などに理解を得るのが難し かったりする
19.
ちょっと個人的に宣伝させてください • 友人とpodcastをはじめました • “楽しくて仕方がないラジオ”
Download now