-
Notifications
You must be signed in to change notification settings - Fork 3.3k
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
better integrate with React Hooks #3056
Comments
@steida in your editor can plugins override other plugins's event listeners? I'm down with changing the architecture to accommodate hooks if it makes the architecture better for sure. Can you example more about how the reducing architecture works? and the client vs. server versions? |
Can you explain the Immer anti-composability argument? Curious about that. Do plugins in your editor have the ability to override functions from other plugins, but then call back into the they want? For example like someone overriding the |
I think I read that plugins will be moving to a different approach like composition, is this hook rewrite intended to happen before or after that change? I have some ideas around hooks, but depending on how the plugin structure will be I don't know if it's worth looking into now. |
@ryanmitts great question! I don’t have anything planned for hooks so far, so after. The one thing I’m wary of with hooks is that it seems like potentially the most “hook-native” API would need to be entirely implemented in hooks? Not something we want to do since non-React use cases are important. At this point I’m mostly interested in hearing other people’s thoughts on what the best hook-based API would be. So I’d love to hear what you’re thinking! |
Could you have a 'special' plugin for the editor that allows setting and changing the implementations of the various callbacks/handlers passed into the editor? You can use hooks to only re-set the handlers when they change. |
Fixed by #3093. |
Do you want to request a feature or report a bug?
Improvement.
What's the current behavior?
The
slate-react
library was written before hooks, and while we were still tied to Immutable.js. It would be nice if it was written to accommodate React Hooks better. I haven't figured out exactly how this would work while still solving for the constraints we have with plugins...But if people have ideas I'd love to hear them!
The text was updated successfully, but these errors were encountered: