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

feat: update ToastManager and PortalManager to optimize rendering and reduce unnecessary re-renders #802

Merged
merged 7 commits into from
Oct 15, 2023

Conversation

@codesandbox
Copy link

codesandbox bot commented Oct 10, 2023

Review or Edit in CodeSandbox

Open the branch in Web EditorVS CodeInsiders

Open Preview

@cheton cheton linked an issue Oct 10, 2023 that may be closed by this pull request
@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 10, 2023

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.

@trendmicro-frontend-bot
Copy link
Contributor

trendmicro-frontend-bot commented Oct 10, 2023

@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (f0f60a0) 71.72% compared to head (562ac48) 71.76%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #802      +/-   ##
==========================================
+ Coverage   71.72%   71.76%   +0.03%     
==========================================
  Files         374      374              
  Lines        6236     6243       +7     
==========================================
+ Hits         4473     4480       +7     
  Misses       1763     1763              
Flag Coverage Δ
react 73.54% <100.00%> (+0.03%) ⬆️
react-hooks 87.58% <ø> (ø)
react-lab 14.04% <ø> (ø)
styled-system 91.73% <ø> (ø)
theme 100.00% <ø> (ø)
utils 70.28% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
packages/react/src/portal/usePortalManager.js 85.71% <100.00%> (+3.89%) ⬆️
packages/react/src/toast/ToastManager.js 70.93% <100.00%> (+0.34%) ⬆️
packages/react/src/toast/useToastManager.js 85.71% <100.00%> (+3.89%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@cheton cheton changed the title feat: apply useCallback in ToastManager's context for function memoization feat: memoize ToastManager context to avoid unnecessary re-renders Oct 13, 2023
@cheton cheton changed the title feat: memoize ToastManager context to avoid unnecessary re-renders feat: update ToastManager and PortalManager to optimize rendering and reduce unnecessary re-renders Oct 13, 2023
@cheton cheton added the 🎉 feature (enhancement) New feature or request label Oct 14, 2023
@cheton cheton merged commit 4f2c8af into master Oct 15, 2023
4 checks passed
@cheton cheton deleted the tonic-ui-801 branch October 15, 2023 12:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🎉 feature (enhancement) New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Should UseToastManager methods be safe to use in useEffect?
3 participants