State Management with Jotai: Pirmitive and Derived Atoms in Action

  Рет қаралды 2,208

makrdev

makrdev

Күн бұрын

How can you manage your React application's state with Jotai. What is the atomic approach that Jotai takes to the global state management? How can we combine atoms to create more complex logic for our state? What are Primitive Atoms and Derived Atoms?
- timestamps -
00:00 - Intro - What is Jotai?
01:02 - How to install Jotai?
01:31 - Creating "Primitive Atom"
03:53 - Reading state with "useAtom" hook
04:36 - Creating controlled input with Jotai
05:45 - Intro to "Derived Atoms"
06:51 - Creating "Derived Atom"
09:06 - Setting another atom with Derived Atom
12:06 - Reading another atom with Derived Atom
15:17 - Creating "sorting functionality" with Derived Atom
Source Code: github.com/batuhanbilginn/jot...
Learn more: makr.dev
#react #statemanagement #nextjs #jotai

Пікірлер: 10
@berniko4954
@berniko4954 Ай бұрын
Nice
@laurentlahmy277
@laurentlahmy277 4 ай бұрын
thanks
@vatansrivastava7279
@vatansrivastava7279 Жыл бұрын
Your video contents quailty are on another level man, Amazing.. If possible please create any big clone app using in next js, typescript, rapid api, jotai for absolute begineer who only knows react
@makrdev
@makrdev Жыл бұрын
Thanks a lot! It’s on my list. Which app do you want me to clone?
@vatansrivastava7279
@vatansrivastava7279 Жыл бұрын
@@makrdev In which you can cover all the topics to become better programmer.
@olabisiolaoye6168
@olabisiolaoye6168 6 ай бұрын
Thank you so much for this video! I'm having an issue with atomWithStorage, though. I saved some data to local storage with this, and I tried using this in a protected route component with the condition that if that data is available in local storage, the user can access that route, otherwise they are redirected to the root route. The problem is that when I use useAtom to retrieve that data in the protected route component, it doesn't get it fast enough and the user is redirected to the root route anyway, even though that data is actually present in local storage. How do I make sure the data is retrieved in real time?
@makrdev
@makrdev 6 ай бұрын
Actually it’s very hard to understand what you are building without code or more context. Seems like you need a loading state. Create another state for loading and wait until you get the data.
@olabisiolaoye6168
@olabisiolaoye6168 6 ай бұрын
@@makrdev Adding a loading state actually worked. All I had to do was find a way to stall the retrieval of the data. Thank you so much!
@vatansrivastava7279
@vatansrivastava7279 Жыл бұрын
and from the upcoming video increase the font size of vs code, its hard to see what you code on my laptop 😃
@makrdev
@makrdev Жыл бұрын
Yeah, you are right. I fixed on latest videos 👍
THEY WANTED TO TAKE ALL HIS GOODIES 🍫🥤🍟😂
00:17
OKUNJATA
Рет қаралды 16 МЛН
Получилось у Вики?😂 #хабибка
00:14
ХАБИБ
Рет қаралды 7 МЛН
NERF WAR HEAVY: Drone Battle!
00:30
MacDannyGun
Рет қаралды 46 МЛН
Rebuilding Jotai State Manager for React in 20 Minutes!
20:25
Jack Herrington
Рет қаралды 31 М.
Create a Search Bar in Next.JS 13 and MongoDB
19:00
Dhriti
Рет қаралды 1,9 М.
State Managers Are Making Your Code Worse In React
13:33
Web Dev Simplified
Рет қаралды 162 М.
Vocal Coach Reacts to MUSE- Unintended LIVE
10:49
Rebecca Vocal Athlete
Рет қаралды 467 М.
Jotai Async
18:47
Sinclair Software
Рет қаралды 1,2 М.
Turbocharge React Shopping Cart: Jotai State Management!
38:07
Mafia Codes
Рет қаралды 2,2 М.
State Management for React: Jotai From Beginners to Masters
16:56
Jack Herrington
Рет қаралды 23 М.
This Library Makes State Management So Much Easier
12:07
Web Dev Simplified
Рет қаралды 131 М.
I Tried 5 Redux Alternatives and Here is the Best one
16:48
CoderOne
Рет қаралды 21 М.
Спутниковый телефон #обзор #товары
0:35
Product show
Рет қаралды 2 МЛН
Simple maintenance. #leddisplay #ledscreen #ledwall #ledmodule #ledinstallation
0:19
LED Screen Factory-EagerLED
Рет қаралды 21 МЛН
GamePad İle Bisiklet Yönetmek #shorts
0:26
Osman Kabadayı
Рет қаралды 493 М.
Мой инст: denkiselef. Как забрать телефон через экран.
0:54