Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add an empty object to prevent unnecessary re-render #1568

Merged
merged 2 commits into from
Oct 26, 2021

Conversation

behnammodi
Copy link
Member

@behnammodi behnammodi commented Oct 22, 2021

What Would You Like to Add/Fix?

This PR will help us to reduce unnecessary re-render in a memoized component when we send classes to it.

Todo

  • Add test(s) that verify the modified behavior

Changelog

Reduce unnecessary re-render when useStyle return {}

@kof
Copy link
Member

kof commented Oct 22, 2021

Thanks, can you also add a test so that we don't break this in the future?

@behnammodi
Copy link
Member Author

Yes sure, I will do it

@behnammodi
Copy link
Member Author

@kof Done

@kof
Copy link
Member

kof commented Oct 26, 2021

LGTM, thanks

@kof kof merged commit 02cb79b into cssinjs:master Oct 26, 2021
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants