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
Jotaiをプロジェクトに導入してみた
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Shogo Fukami
December 10, 2022
130
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Jotaiをプロジェクトに導入してみた
Shogo Fukami
December 10, 2022
More Decks by Shogo Fukami
See All by Shogo Fukami
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
10
4.2k
駆け出しSREが半年で作り上げた仕組みと学びのまとめ
shogo4131
0
420
フロントエンド UIコンポーネント Shadcn/uiの良さを伝えたい!
shogo4131
0
330
本業 + 副業2社で働くエンジニアの時間術
shogo4131
0
300
スタートアップで学ぶフルリモート開発の進め方
shogo4131
0
650
フリーランスエンジニア辞めてみた!
shogo4131
0
730
MUIは不要? React次世代コンポーネントライブラリ Mantine!!!
shogo4131
0
240
Featured
See All Featured
Tips & Tricks on How to Get Your First Job In Tech
honzajavorek
1
740
New Earth Scene 8
popppiees
4
2.6k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2.1k
職位にかかわらず全員がリーダーシップを発揮するチーム作り / Building a team where everyone can demonstrate leadership regardless of position
madoxten
69
65k
4 Signs Your Business is Dying
shpigford
187
23k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
368
27k
The AI Search Optimization Roadmap by Aleyda Solis
aleyda
1
6.2k
Leo the Paperboy
mayatellez
10
2.3k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.8k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
380
A Modern Web Designer's Workflow
chriscoyier
699
190k
Transcript
Jotaiをプロジェクトに導 入してみた @react_nextjs 2022/12/10
自己紹介 ・フロントエンドエンジニア(フリーランス) ・経験2年8ヶ月 ・React Next.js TypeScript ・大手決済サービスのフロントエンド開発 ・技術ブログ(https://react-uncle-blog.netlify.app/) ・Twitter(https://twitter.com/react_nextjs)
アジェンダ ・Jotaiってなに? ・プロジェクトに導入した経緯 ・サンプルソースの紹介
皆さん!! Jotaiって知ってますか??
Reactの状態管理ライブラリです!! 公式: https://jotai.org/
JavaScript Rising Starsで堂々の3位 参考: JavaScript Rising Stars 2021
詳しくは技術ブログで!! Reactの状態管理ライブラリを比較してベストな選択肢をしよう!
なぜプロジェクトで導入したのか?
要件 ・複数のページ間で保持しないといけない値が多かっ た ・グローバルで管理する状態を永続的に管理しないと いけなかった
その他候補に上がった状態管理ライブラリ ・Recoil ・Zustand 候補には上がりましたが、次の理由で選定から外しました。
• Recoil ◦ 正式リリースじゃないので破壊的変更がくる可能性があった ◦ パッケージサイズがやたらと重い(2.2MBくらい) ◦ 永続化するにはrecoil-persistというライブラリを別で導入しない といけない •
Zustand ◦ Reduxよりは簡潔に記述できるが、プロジェクトが始まった当初、 他メンバーのスキル感があまり高くなかったので学習コストがか かると感じた
消去法ではあったがJotaiに決まった ・学習コストがとても低く、React HooksのuseStateのように状態管理が できるので最低限のReactの知識があれば問題ないと感じた ・Recoilは状態の永続化をするのに別ライブラリを導入しないといけな かったが、Jotaiであれば標準搭載しているAPIがあるのでライブラリを 導入する必要がなかった ・作者が日本人なので日本語の情報が豊富
Jotaiのコードを簡単に紹介!!
None
None
ご静聴ありがとうございました!!