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

Removing 'getTheme' from BasicList examples #30641

Merged
merged 3 commits into from Feb 29, 2024

Conversation

mltejera
Copy link
Contributor

@mltejera mltejera commented Feb 28, 2024

The basic list examples all use getTheme which does not respond to contextual theme changes, the modern v8 method for theming.

This PR updates them to use the useTheme hook. There's some rearrangement required since the styles are passed into the render functions. Sorry for the load PR.

More generally:

  • Move render and style generating function to within the scope of the component.
  • Apply useCallback for the renders, useMemo for the style generators.
  • Tidy up some styles.

Addresses #30358

@fabricteam
Copy link
Collaborator

fabricteam commented Feb 28, 2024

📊 Bundle size report

🤖 This report was generated against 6dbbed43b5a12846cbb4f781f8de8b62f010ebc9

Copy link

codesandbox-ci bot commented Feb 28, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@mltejera mltejera marked this pull request as ready for review February 28, 2024 19:19
@mltejera mltejera requested a review from a team as a code owner February 28, 2024 19:19
@mltejera mltejera merged commit 6bd8fa7 into master Feb 29, 2024
20 checks passed
@mltejera mltejera deleted the user/matejera/remove-getTheme-from-demo branch March 8, 2024 22:55
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

4 participants