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
Neto
Neto3y ago
why use redux?
Typedef
TypedefOP3y ago
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.
Neto
Neto3y ago
if you have a reason to keep the ref in a more global state its fine
Typedef
TypedefOP3y ago
Whats your preferred way of doing it?
Neto
Neto3y ago
without knowing why you want to keep a ref in a redux store i can speak much
Typedef
TypedefOP3y ago
I got multiple components controlling a video element
Neto
Neto3y ago
oh its fine then i kind of do something like that for a personal project, works fine just zustand instated of redux
Typedef
TypedefOP3y ago
bet bet ill check it out
Neto
Neto3y ago
Typedef
TypedefOP3y ago
I'm just trying to make a video editor haha
Neto
Neto3y ago
as for redux not a fan of the whole pattern toolkit helps but still
Typedef
TypedefOP3y ago
I cant say anything I've always used react context for global states.. realized I need to learn state management libraries
Neto
Neto3y ago
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 ...
Neto
Neto3y ago
a nice video about it
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Keef
Keef3y ago
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
Neto
Neto3y ago
i think zustand lave a small footprint in all things considered
- create a store - import the store (or variable) - usage
Keef
Keef3y ago
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
Neto
Neto3y ago
ye my issue with redux isnt the lib, its the pattern behind it
Keef
Keef3y ago
yep yep
Neto
Neto3y ago
for giant scales can be better but for small scale apps too much work with not that much return
NekoChan
NekoChan3y ago
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...
Scot
Scot3y ago
@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
Want results from more Discord servers?
Add your server