Skip to content
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

React collaboration demo #1991

Merged
merged 2 commits into from
Oct 8, 2021
Merged

React collaboration demo #1991

merged 2 commits into from
Oct 8, 2021

Conversation

svenadlung
Copy link
Contributor

First, basic proof of concept which is creating ydoc and websocket instances outside of the component. This works well as long as you don't have any dependencies changing by a React state for example. This could be a dynamically changed room name. To address this case you could work with React context and conditional rendering. You could also use a component initialising ydoc and websocket provider and include an editor component with both references given in props once they are ready.

@philippkuehn philippkuehn merged commit cf97cdf into main Oct 8, 2021
@philippkuehn philippkuehn deleted the docs/react-collaboration branch October 8, 2021 09:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants