Hi everyone! I hope you're safe and good.
I want to talk about something different today. I want to share some tips and strategies that will help...
For further actions, you may consider blocking this person and/or reporting abuse
Great writeup. I haven't seen prop-types used for a while, but that might just be because I use TypeScript. Other than that, I agree with all of the points. Especially the point about hooks and when to refactor to them. They're awesome.
Thanks Andrew. I've heard great things about using typescript with react, but I am yet to try it.
You went straight from 1 to 3 π all of this is pretty good. Would disagree that functional components are the future. I see so many people talk about hooks over classes. It all depends on the situation and the complexity of the component. Ever seen a complex component or something like a form with hooks? Awful. Messy. Impossible to follow.
Lol I haven't seen that. Thanks for pointing out.
I don't know understand what you mean by complex component. In context of form, I don't see how classes with be more beneficial than functional component.
I think it all depends on preference and like you said, situation.
Using eslint and prettier can be added but that would be "the way" for most of people
Just remove it and use web components.
Pardon?
Although that was a semi sarcastic comment, the reply tells a lot. "Become a better react developer by ignoring anything that is not react"? One true react dev would have argued why web components might not be a good alternative solution.
If he's something to say, why the sarcasm? I am sorry for not getting his sarcasm.
Amazing!
I am glad you liked it. Thanks.
Good article. This answered my question about why and when i should use class component based and function component based. I hope you write next about function component and advanced hooks use. π
How is hooks compared to using a Redux for example?
Hooks and redux aren't alternatives, they work together. Redux even comes with hooks: react-redux.js.org/api/hooks
Though a lot of apps that use Redux might not need it to begin with: simplethread.com/cant-replace-redu...