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

Avoid repeat initialization #12

Open
andy-sweet opened this issue Jan 26, 2024 · 1 comment
Open

Avoid repeat initialization #12

andy-sweet opened this issue Jan 26, 2024 · 1 comment

Comments

@andy-sweet
Copy link
Collaborator

As part of the React migration, one of the effects only occurs on mounting. In the production app, this will only ever be called once. But in development (and potentially in future versions of the app) it is called twice, which at best is wasteful and at worst may introduce in bugs.

The goal of this issue is to remove the second call to this.

See a recent PR comment for more context

This was referenced Jan 26, 2024
@andy-sweet andy-sweet self-assigned this Mar 11, 2024
@andy-sweet
Copy link
Collaborator Author

I made an attempt at initialize the PointCanvas once in app.tsx (instead of the mount effect in scene.tsx) and passing that through, but I could get the Scene component to re-render on width changes. And generally, this did not feel much better or a good use of time right now.

@andy-sweet andy-sweet removed their assignment Mar 11, 2024
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

1 participant