-
-
Notifications
You must be signed in to change notification settings - Fork 73
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
Consider removing the React dependency? #298
Comments
Hi @pubuzhixing8, Awesome to hear that you are using slate-yjs in production. Your help would definitely be very appreciated! Sadly we currently rely on the react peer-dependency for cursors, but with the rewrite in v4 we could clean up the API a bit and might be able to remove that dependency. I wasn't aware that there are different view layer implementations of slate, thanks for bringing that to my attention 😄 |
I do agree I used also this lib in backend (NodeJS) because I do some replacement under the document and then I need to force the normalisation of the editor while everything sync back to the Yjs doc store. I do not want to have extra library like react in backend, so I just added a |
Even with the removed dependency, it would be a good idea for this repo to provide for react/angular/other specific implementations. I would say a monorepo with multiple "adapter" packages would do the trick for that - have a core slate-yjs repo that only does slate-yjs stuff, slate-yjs-react for the addition of the react hooks and others, etc... It should be relatively simple to do, and if a major bump is coming either way it might be the perfect time to do it. |
My goal for v4 is to make cursors entirely platform-independent, so just have a Btw, so sorry for taking so long on v4 but it's hard to prioritize working on this rn. There are some awesome changes coming including an almost complete document flattening (using nested Y.XmlTexts) which would result in idiomatic conflict resolution in almost all cases. |
Looking forward, it sounds awesome! It would be nice also to consider a simple conversion script for production data. |
Next is split into core and react, core contains all frontend independent logic/utils and doesn't have a react dependency. |
Hey,
Thank you for your contribution. We also chose slate + yjs + slate-yjs as the technical solution for collaborative editing, and our development work has been basically completed.
But our front-end framework is Angular, so we developed an Angular-based view layer slate-angular based on slate. Fortunately, the logic of slate-yjs is also adapted to slate-angular, but it relies on react, so we have to recreate the repo , Copy most of the code snippets...
As mentioned earlier, our real-time collaborative editing has been developed and we have tried to solve some problems (Undos management). Of course, there are some problems that have not been solved (such as Relative position). We will create related Issues and PRs. Hope it is helpful to slate-yjs.
If the dependencies of react can be removed, then we can directly rely on slate-yjs instead of maintaining two repositories.
Thanks and good wishes
The text was updated successfully, but these errors were encountered: