-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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: Editor: onTextChange handler does not reflect updated props #6087
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
Thanks a lot for your contribution! But, PR does not seem to be linked to any issues. Please manually link to an issue or mention it in the description using #<issue_id>. |
If we don't want to add new hooks we can like ... React.useEffect(() => {
if (quillCreated) {
quill.current.on('text-change', onTextChange);
quill.current.on('selection-change', onSelectionChange);
return () => {
quill.current.off('text-change', onTextChange);
quill.current.off('selection-change', onSelectionChange);
};
}
}); |
Hmmm I like simple but i also like how powerful that useEvent hook is an could be useful in the future? |
reactjs/react.dev#5373 |
use simple writing seems to be no problem, but |
OK then lets go with the simplest changes? |
resubmitted a PR and fixed test case |
Fix #6067