-
Notifications
You must be signed in to change notification settings - Fork 923
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
Cleaner rerendering #177
Cleaner rerendering #177
Conversation
Concept of `cleanProps` allows performing regular updates that affect DOM nodes. Keyed elements and controlled lifecycle avoid breaking Quill during re-renders. Optimized comparisons for value prop updates after content changes.
@alexkrolick try doing something outrageous, such as changing the theme every few seconds. Changing things like Focus can't be maintained (yet) when re-rendering the whole Quill. |
I'm thinking that these APIs should be used in the regeneration case: |
Demo of the two cases to confirm this is working: https://codepen.io/alexkrolick/pen/KWBJgQ?editors=0010 |
- preserves focus between dirty updates
@zenoamaro 🍾 Type something and wait for the theme to change: |
- clear the cached selection and quill delta after regenerating for a dirty update so that later changes will pass through to the state.value condition - add comments for regeneration code
Great, thanks a lot! 🎩 |
I considered making this |
Concept of
cleanProps
allows performing regular updates that affect DOM nodes.Keyed elements and controlled lifecycle avoid breaking Quill when re-rendering.
Optimized comparisons for value prop updates after content changes.
Should fix #147 and others.