Thanks for your answer!
Personally, in this moment I prefer to use only functional component with hooks (in my opinion hooks are the future in reactjs).
For example, in general I create a custom hooks with the business logic:
Yes, for sure it works perfectly fine! And the usage for sure depends on the scale as well, so for me, I always start with functional and the project itself tells me when to go the other way around. That is mostly to adapt to a plugins coding pattern or any other reason. 🖖
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thanks for your answer!
Personally, in this moment I prefer to use only functional component with hooks (in my opinion hooks are the future in reactjs).
For example, in general I create a custom hooks with the business logic:
// useCategory
And in the FC I have only this:
const category = useCategory();
With this method, I can reuse useCategory in all of my components, and I think is better in case of re-factoring (coding/HTML).
Yes, for sure it works perfectly fine! And the usage for sure depends on the scale as well, so for me, I always start with functional and the project itself tells me when to go the other way around. That is mostly to adapt to a plugins coding pattern or any other reason. 🖖