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

Containers: Don't re-append SVG defs if they didn't change #405

Merged
merged 2 commits into from
Jun 26, 2024

Conversation

rokotyan
Copy link
Contributor

Currently SVG defs are re-appended on each render and it causes flickering. This PR fixes it.

Before (icons are flickering)

Screen.Recording.2024-06-21.at.2.46.41.PM.mp4

After (no flickering)

Screen.Recording.2024-06-21.at.2.45.52.PM.mp4

@lee00678
Copy link
Collaborator

@rokotyan do you know under what circumstance the flickering occurs? But regardless I think not re-render on each render is a good idea.

@rokotyan
Copy link
Contributor Author

@lee00678 On any event that triggers graph rendering, e.g. a prop change in React (a pretty common scenario)

@lee00678
Copy link
Collaborator

@lee00678 On any event that triggers graph rendering, e.g. a prop change in React (a pretty common scenario)

Gotcha. I see it happen now. Thanks for the info.

@reb-dev reb-dev merged commit e12f8f8 into f5:main Jun 26, 2024
4 checks passed
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

Successfully merging this pull request may close these issues.

3 participants