liveblocks icon indicating copy to clipboard operation
liveblocks copied to clipboard

Add SolidJS integration

Open nikivdev opened this issue 2 years ago • 3 comments

Is your feature request related to a problem? Please describe.

Would love to use Liveblocks with SolidJS but there is no official integration.

There is a JavaScript library and I was told in Discord I can build on top of it.

javascript package has enough for you to make your own abstractions if needed

I'd start with some simple handwritten createSignals and createEffects, then pull those into hooks when you want to reuse that

I was also told to open an issue here so that an official integration be added. Ideally with similar template as in this tweet:

https://twitter.com/ctnicholasdev/status/1622977852542160896

nikivdev avatar Feb 07 '23 20:02 nikivdev

Hey @nikitavoloboev,

Thank you for your feedback! I added it to our backlog.

In the short term, the best thing we can provide is these 2 examples:

https://github.com/liveblocks/liveblocks/tree/main/examples/solidjs-live-avatars https://github.com/liveblocks/liveblocks/tree/main/examples/solidjs-live-cursors

They're built with Solid and are using @liveblocks/client

GuillaumeSalles avatar Feb 07 '23 22:02 GuillaumeSalles

@GuillaumeSalles XState recently added a SolidJS integration. Since, both XState and Liveblocks core provide an external store and uses the useSyncExternalStore hook for their React implementation, I think this could be a good place to start the investigation.

Link to the PR: https://github.com/statelyai/xstate/pull/2932

nimeshnayaju avatar Mar 06 '23 01:03 nimeshnayaju

Whipped together a pretty rudimentary port of the React hooks for a side project. Could maybe hold folks over until something more robust is put together.

tmns avatar Mar 06 '23 12:03 tmns