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

Clean up ref-handling logic #11093

Open
1 of 5 tasks
jcfranco opened this issue Dec 17, 2024 · 0 comments
Open
1 of 5 tasks

Clean up ref-handling logic #11093

jcfranco opened this issue Dec 17, 2024 · 0 comments
Labels
0 - new New issues that need assignment. calcite-components Issues specific to the @esri/calcite-components package. needs triage Planning workflow - pending design/dev review. refactor Issues tied to code that needs to be significantly reworked.

Comments

@jcfranco
Copy link
Member

Description

Lumina calls ref when a component is disconnected, so #10310 mainly focused keeping refs and returning early if nulled. We should revisit these areas to see if we can improve teardown of cleared refs.

Proposed Advantages

Decrease chances of memory leaks.

Which Component

Any component using ref.

Relevant Info

No response

Calcite package

  • @esri/calcite-components
  • @esri/calcite-components-react
  • @esri/calcite-design-tokens
  • @esri/calcite-ui-icons
  • @esri/eslint-plugin-calcite-components
@jcfranco jcfranco added refactor Issues tied to code that needs to be significantly reworked. 0 - new New issues that need assignment. needs triage Planning workflow - pending design/dev review. labels Dec 17, 2024
@github-actions github-actions bot added the calcite-components Issues specific to the @esri/calcite-components package. label Dec 17, 2024
jcfranco added a commit that referenced this issue Dec 23, 2024
)

**Related Issue:** #10731

## Summary

Adds a guard to `popover` and `tooltip` `ref` callbacks to avoid missing
ref warnings on removal. After #10310, `ref` callbacks are invoked both
when the component is added and removed (see
#11093).

BEGIN_COMMIT_OVERRIDE
omitted from changelog
END_COMMIT_OVERRIDE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0 - new New issues that need assignment. calcite-components Issues specific to the @esri/calcite-components package. needs triage Planning workflow - pending design/dev review. refactor Issues tied to code that needs to be significantly reworked.
Projects
None yet
Development

No branches or pull requests

1 participant