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

fix(web-console): combine buffer init into a single hook #274

Merged
merged 1 commit into from
Apr 2, 2024

Conversation

ngnic
Copy link
Contributor

@ngnic ngnic commented Apr 2, 2024

Querying the buffer store through Dexie's live query caused frequent re-renders on any component that used the EditorProvider Context as each character entered into the buffer would trigger a change in state.

The flickering borders indicate components that are re-rendered.

Before:

Screen.Recording.2024-04-02.at.3.20.38.PM.mov

After:

Screen.Recording.2024-04-02.at.3.22.29.PM.mov

The buffer is still being persisted correctly into indexedDB.

Screen.Recording.2024-04-02.at.3.25.34.PM.mov

@ngnic ngnic requested a review from insmac April 2, 2024 07:27
@ngnic ngnic changed the title fix: combine buffer init into a single hook fix(web-console): combine buffer init into a single hook Apr 2, 2024
Copy link
Contributor

@insmac insmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked the fix in profiler + tested the persistence layer.

@ngnic ngnic merged commit e19e4f5 into main Apr 2, 2024
2 checks passed
@ngnic ngnic deleted the fix/combine_buffer_init branch April 2, 2024 09:33
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.

2 participants