Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple APILearn More
Voxera860829dRedux is just one state manager.
Hooks is partly state management.
Context isa built in building block for state handling.
Unless you have decided to use redux there is nothing forcing you to use it and there are many newer, and in my opinion easier to use, state management solutions.
Hooks + context goes a long way unless you plan to use a lot of centralized business rules in state.
Mobx is one I liked a lot but currently hooks is sufficient:)
Just don’t use redux... I found that even for times where you want to have special business logic in your state, you can get away with doing it in hooks (like writing your own custom hooks for auth or API).
bioDan555129dNot much of a front end developer here but doesnt redux also stores the state in the localStorage and manages it?
Would you manage your localStorage state in each hook of every component you write?
junon85029dDon't use redux. Two companies in a row spent 3-4 months removing it with every little thing going wrong at every turn.
bklw3429dJust don't use it. Redux sucks, it's a lot of boilerplate to do simple tasks. Hooks and Context do pretty much the same thing in a much better way
homo-lorens560529dWell, if you're religious then the god object might appeal to you. Although manually creating a god isn't part of most religions that I'm aware of.
d-fanelli22229dRedux is too much work. You need middleware, action creators, and creators of action creators
Voxera860829d@Devnergy well, unfortunately that is one pressning reason :/
The reason many avoid it is thats its a lot of boiler plate and its also rather disconnected so its not always easy to follow what is happening.
With good documentation it can work.
But the company I work for started using it a couple of years ago and are now moving away from it because its not worth the extra work needed.
But done right it still gets the work done.
But if its company policy the only way would be to convince some one with the power to change policy and that usually involved proving that a change would save or make more money.
And since a change always has some transition cost its not a given that it is the right business decision.
Devnergy599628d@Voxera I agree. We will start a project from scratch and the tech lead chose Redux for the global state management. I'm not sure if he likes it, don't know the cons, don't know RxJs/Hooks + Context API or Redux is the only global state management he know. I don't want to contradict his tech stack since he's the tech lead.
RxJs or Hooks + Context API is much better than Redux.
Voxera860828d@Devnergy what you know is almost alway better than something you don’t know. And if you have lots of existing code or structures you plan to reuse it can also be a factor.
But I would recommend that unless you already know hooks and context that you experiment with it on your own time to learn.
That way you improve your knowledge and once you know it good, its easier to take it up with the tech lead, possibly just the two of you to avoid prestige to be to much of a factor.
Unless you plan to try to replace him, let it be him who takes the idea to the rest of the team, that way he can keep the lead role ;)
kiki17You know who sucks at developing APIs? Facebook. I mean, how are so high paid guys with so great ideas man...
wxcazee16Here is a tutorial on how to create a contact form in React / Redux.
drGreat58So I put a very strict eslint configuration to a 6 month old project .. .. .. .. 924 errors in 27 files .. .. ...