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

How integrate with Vue3? #139

Closed
bponix opened this issue Dec 27, 2023 · 2 comments
Closed

How integrate with Vue3? #139

bponix opened this issue Dec 27, 2023 · 2 comments

Comments

@bponix
Copy link

bponix commented Dec 27, 2023

Could you please share a simple example demonstrating the integration of Reka.js with Vue.js, focusing on efficient JSON rendering for production?

@tasiotas
Copy link

tasiotas commented Jan 1, 2024

Is reka for React only or could be used with Vue as well? Guide or example would be greatly appreciated.

@prevwong
Copy link
Owner

prevwong commented Jan 2, 2024

Reka is framework agnostic. The only real framework-specific integration that needs to be done is to create a renderer that will take a given View tree from Reka, and render it in your framework of choice.

We do have a small @rekajs/react package which provides a hook that is essentially a tiny wrapper on top of the core APIs; and since Reka is built on Mobx, it also provides a re-export of the observer component from mobx-react; but that's about it, everything else comes from the core package.

So to get this to work with Vue, I don't think there needs to be anything special that needs to be done with Reka apart from just creating a renderer with Vue and maybe use the mobx-vue package to make this process a little bit easier (although I think you should be able to achieve the same results with the .subscribe method from the @rekajs/core package).


It's been a while since I used Vue, so I'd be happy to accept some PRs if anyone is able to build a small example and tutorial!

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

No branches or pull requests

2 participants