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