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

connectedCallback() ? #177

Open
abasse opened this issue Apr 6, 2024 · 1 comment
Open

connectedCallback() ? #177

abasse opened this issue Apr 6, 2024 · 1 comment

Comments

@abasse
Copy link

abasse commented Apr 6, 2024

Is it possible to attach code from react I to the connectedCallback() and disconnectedCallback() ?

@bmomberger-bitovi
Copy link
Contributor

Is there something that you can't accomplish with useEffect(() => {...}, [])? r2wc's internal connected and disconnected callbacks are mounting and unmounting the component to the element's React root, which should always trigger a useEffect with no dependencies, and its associated teardown function.

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

No branches or pull requests

2 participants