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 day component props for memo equality control #2437

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

brianangulo
Copy link

Hi, @Inbal-Tish @ethanshar I would like to hear your thoughts on this. Thank you for all your work contributing to open source.

The Problems:

  • The Day component will often cause performance issues coming from it not properly memoizing leading to unnecessary rerenders.
  • Passing additional data to a custom day component would require declaring it as a function on the parent component and passing it to the Calendar. This is inconvenient and inefficient.

Solutions:

  • Adding a prop dayComponentMemoEqualityFn that allows the user to override the default equality function thus giving the consumers more fine control over memoization of the component
  • Adding a prop extraData inspired by react-native Flatlist's extraData to give the consumers a better and guided way of passing data

@brianangulo
Copy link
Author

Could you take a peek please @M-i-k-e-l 🙏 ?

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.

None yet

1 participant