Two days ago, I had a small conflict with my coworker.
It happened because we had different goals for using Redux.
In my opinion, we should use Redux only for managing state.
For example, let's say there's a parent-child relationship, but the child also has its own child, and so on. At the last child level, some data is updated.
That data should also be updated in the parent page automatically through re-rendering.
If you don't use Redux or any state management tool, you have to manually send the updated state back to the parent. But in React, a child can't directly update a parent's state (of course, there are ways to send data to the parent, but they go against React’s design philosophy).
Also, passing state down multiple levels (from parent to child, then child to child, and so on) is too burdensome.
So, I suggested to my coworker that we use Redux.
But he had a different goal—he just wanted to use Redux to avoid using useState altogether.
I think he has a wrong understanding of Redux...
After merging my code with his, I realized that there were so many Redux slices.
Even worse, Redux was being used in places where it wasn’t even necessary—like for managing input values, pagination counts, etc.
So I asked him, "Why are you managing the input state with Redux?"
And he said, "Just to avoid using useState."
I was shocked. 😳
I tried several times to change his perspective because we were working on shared modules, and he had implemented everything using Redux.
So I had to convince him...
But I failed. 😞
What I Learned from This Experience
First, we need to listen to others' opinions, especially when they seem desperate about something.
Second, think many times and suggest somthing to support my opinion
Lastly, I need to improve my skills.
In the development world, your skills matter the most.
Since our code clearly reflects our abilities, we can easily gauge someone's level just by looking at it.
So... I’ll work even harder so that no one looks down on me. 😤🔥
'열정가득한 개발자의 이야기 > 개발자의 일지' 카테고리의 다른 글
Udemy 강의 <React - The Complete Guide 2024 (incl. Next.js, Redux)> (0) | 2024.08.25 |
---|---|
CS50 1 course (0) | 2024.08.04 |
Restart (0) | 2024.08.04 |
항해 4주차 (1) | 2024.07.13 |
항해 프론트엔드 2기 1주차 회고록 (0) | 2024.06.22 |