-
Notifications
You must be signed in to change notification settings - Fork 5
[FSSS-172] Fix/Adjust inappropriate rerenders #304
Conversation
368ea18
to
9388674
Compare
Preview is readyThis pull request generated a Preview👀 Preview: https://preview-304--base.preview.vtex.app |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 👏 👏 Made it looks easy. Great job 🚀
VERYY NICEE! 🥳 🥳 Well done!! 🚀 |
I also didn't know about that option for the React extension! Today I Learned. |
9388674
to
c58d1b2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👏 👏 👏 Heyyy, Amazing changes!
Very nice extractions into new hooks, good use of destructuring, etc.
The code looks more legible and better now! 🤩
I wonder if should we memo small components since maybe keeping the react algorithm rerender can be better for performance in this case. It's more recommendable memo medium to large components.
ref: https://dmitripavlutin.com/use-react-memo-wisely/#2-when-to-use-reactmemo
Signed-off-by: Arthur Andrade <arthurfelandrade@gmail.com>
Signed-off-by: Arthur Andrade <arthurfelandrade@gmail.com>
c58d1b2
to
4f3e1c6
Compare
What's the purpose of this pull request?
This PR fixes some inappropriate rerenders with memo function and removing peer dependencies from hooks. To observe this rerenders I used the React Developer Tools with the option "Highlight updates when components render" checked.