composablesys / collabs

Collabs library monorepo
https://collabs.readthedocs.io/
Apache License 2.0
246 stars 11 forks source link

React hooks and components #256

Closed mweidner037 closed 11 months ago

mweidner037 commented 1 year ago

Draft here: https://github.com/mweidner037/fileshare-recipe-editor/tree/master/src/renderer/script/collabs-react

mweidner037 commented 1 year ago
mweidner037 commented 11 months ago
mweidner037 commented 11 months ago

I have a draft of a useCollab hook and a CollabsTextInput component in https://github.com/mweidner037/fileshare-recipe-editor/ . I think I will just copy these over as a new @collabs/react package.

I'll also the frontend of that demo to the monorepo's demo folder, so we can test the react package. We can also demo hiding the display until the WebSocketNetwork "Load" event (with a comment that you'd usually instead wait for IndexedDBDocStore, so you can load even offline).

CollabsTextInput improvements: