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

non-React examples? #192

Open
rozek opened this issue May 22, 2024 · 4 comments
Open

non-React examples? #192

rozek opened this issue May 22, 2024 · 4 comments
Assignees

Comments

@rozek
Copy link

rozek commented May 22, 2024

Are there some examples for using jazz in a browser environment without React?

I played around a bit, but did not succeed at all - I could not even build jazz itself.

Thus, some more examples (and a more complete documentation) would be helpful...

@aeplay
Copy link
Contributor

aeplay commented May 23, 2024

Hey, a whole new website & docs is coming up in the next days. You should be able to use the jazz-browser package then and I'll add a minimal example.

Are you planning to use a bundler, or which kind of setup do you have in mind?

@rozek
Copy link
Author

rozek commented May 23, 2024

I often do not bundle my web apps themselves but prefer interactive live "no-build environments" for which I sometimes bundle the required modules (using "vite").

The apps themselves use "htm" and "preact" (but "preact" component classes rather than functional components) I already looked at https://github.com/nichoth/jazz-preact but could not easily extract the underlying jazz mechanisms from the code (jazz-preact uses "hooks" for preact functions rather than classes)

@aeplay
Copy link
Contributor

aeplay commented May 25, 2024

It would be really fun to see how well jazz works in a non-bundled environment. I wonder if I could publicly host a pre-bundled version of jazz-browser and all its dependencies for simple importing?

I'm assuming preact class components work like old React classes - so instead of hooks the way to idiomatically expose subscribed CoValue state would be through a higher-level component?

@rozek
Copy link
Author

rozek commented May 25, 2024

as soon as I understand working with Jazz, i can also create a bundle myself and "publish" that on a GitHub page (like my automerge-bundle, f.e.)

Concerning preact and others: plain vanilla JS examples would be all I need - and these examples would help users of other frameworks as well

@aeplay aeplay self-assigned this Jul 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants