-
-
Notifications
You must be signed in to change notification settings - Fork 49
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
Vanilla JS example #160
Comments
There's a basic example without React here: https://github.com/prevwong/reka.js/tree/main/examples/00-basic |
I'm sorry I was unclear. In issue #139. You mentioned an implementation with subscribe. There is not a lot of documentation on this function. I thought about implementing a simple editor in vanilla js and took that as a pointer, but I did not come far. |
Ah okay. So firstly, as you already know - Mobx is used in Reka as the reactive state management provider - so the The core functionality of Reka is to ensure that any resulting Reka has some methods like const frame = reka.createFrame({...});
reka.subscribe(() => {
// get the values you need:
return {
tag: t.assert(frame.view.render[0], t.TagView).tag
}
}, (collected) => {
console.log("The tag has changed", collected.tag);
}); So let's say you want to render some HTML elements for every |
Thanks for the library! It seems useful and lightweight, which I can really appreciate.
I would like to try out the library myself, but I have a hard time implementing the library in another framework (or vanilla js). Could you give a minimal example on how the subscrive pattern (or mobx in general) could be used without a framework? Or some pointers for me to implement it myself? It is way easier to integrate the library anywhere if I have a better understanding of what happens under the hood.
The text was updated successfully, but these errors were encountered: