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

[Refactor] Clean up the themed controls when unmounted #1221

Closed
1 task
dzole0311 opened this issue Oct 29, 2024 · 2 comments
Closed
1 task

[Refactor] Clean up the themed controls when unmounted #1221

dzole0311 opened this issue Oct 29, 2024 · 2 comments
Labels
tech debt veda v2 VEDA Refactor Epic Work

Comments

@dzole0311
Copy link
Collaborator

Context

There is an error that's thrown sometimes when navigating to the different routes (on the first map element in the stories, or the exploration page) in the Next.js instance. It happens only in the dev environment.

 Unhandled Runtime Error
Error: Cannot update an unmounted root.

Source
app/scripts/components/common/map/controls/hooks/use-themed-control.tsx (48:23) @ render

  46 |   useEffect(() => {
  47 |     if (rootRef.current) {
> 48 |       rootRef.current.render(
     |                       ^
  49 |         <ThemeProvider theme={theme}>{renderFn() as any}</ThemeProvider>
  50 |       );
  51 |     }

Acceptance Criteria

  • The error should not be thrown

Related Tickets

[If applicable, link any tickets that are related]

@hanbyul-here
Copy link
Collaborator

👋 I was wondering if this can be a byproduct of the other error (the component is not getting properly mounted because there is an error) and I suspect it might be the case after looking into the problem in this branch - #1229 Can you confirm if you still see this error with etc-fix branch?

@hanbyul-here
Copy link
Collaborator

Closed via #1229

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tech debt veda v2 VEDA Refactor Epic Work
Projects
None yet
Development

No branches or pull requests

3 participants