Redux Toolkit
Im new to redux, is it okay to store refs in redux store... should I disable the serializable check for it? or nah. What do you guys think?
23 Replies
why use redux?
I use redux for state management for the whole project im doin. I know I can use context but... I just wanted to ask the question above.
if you have a reason to keep the ref in a more global state
its fine
Whats your preferred way of doing it?
without knowing why you want to keep a ref in a redux store
i can speak much
I got multiple components controlling a video element
oh
its fine then
i kind of do something like that for a personal project, works fine
just zustand instated of redux
bet bet ill check it out
I'm just trying to make a video editor haha
as for redux
not a fan of the whole pattern
toolkit helps but still
I cant say anything I've always used react context for global states.. realized I need to learn state management libraries
Jack Herrington
YouTube
Picking From 20 React State Managers
I built the same project with twenty different React state managers. I'll show you around the different models of state management using libraries like Recoil, Akita, Redux using Redux Toolkit, Mobx, and more!
Code: https://github.com/jherr/which-react-state-manager
👉 What's my theme? Night Wolf [black]
👉 What's that font? Operator Mono
👉 I'm ...
a nice video about it
Unknown User•3y ago
Message Not Public
Sign In & Join Server To View
Great video ty
I've also moved from redux to zustand since the amount of work to do something is annoying but tool kit does relieve some of it
Zustand is pretty nice +1 but on topic w redux. I think with redux as long as its serializable its fine to stash it there without getting into if ITS TRULY NEEDED IN GLOBAL STATE vs more of a context-like state
i think zustand lave a small footprint in all things considered
- create a store - import the store (or variable) - usage
Yeah but its a bit leaner in terms of set up compared to flux architecture which is what redux is
Its just less walls to do thing for me while still ultimately solving the same problem for the most part
ye
my issue with redux isnt the lib, its the pattern behind it
yep yep
for giant scales can be better
but for small scale apps
too much work with not that much return
GitHub
GitHub - nanostores/nanostores: A tiny (258 bytes) state manager fo...
A tiny (258 bytes) state manager for React/RN/Preact/Vue/Svelte with many atomic tree-shakable stores - GitHub - nanostores/nanostores: A tiny (258 bytes) state manager for React/RN/Preact/Vue/Svel...
@0xTypedef sounds like you're trying do something not intended by flux
Feel free to dm if you wanna chat more in depth
And also in case you want to avoid the classic stack overflow answer of "why would you x use y instead"
Even tho y has the same issues