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

Working example of integration with Sinuous? #27

Open
mindplay-dk opened this issue May 25, 2021 · 2 comments
Open

Working example of integration with Sinuous? #27

mindplay-dk opened this issue May 25, 2021 · 2 comments

Comments

@mindplay-dk
Copy link

Do you have a working example of how to integrate this with Sinuous?

Specifically, how to use observable to make templates that can update?

Can you make {{#each}} work with map to support lists in the data-model, or how would that work?

Or is this designed to just render once and not update? (if so, what's the point of integrating with Sinuous?)

@luwes
Copy link
Owner

luwes commented May 26, 2021

@mindplay-dk thanks for your interest, I don't have a fully working example yet.

In this comment I explain the missing pieces, luwes/sinuous#171 (comment)

The only thing that is left to make it work seamlessly with Sinuous is to write custom helpers that would add the right mappings. For example each would have to call the Sinuous map module for rendering lists. Also the variable expressions would need to be expanded to observables wrapped in a closure to make everything reactive.

@mindplay-dk
Copy link
Author

Cool, that doesn't sound so bad. If we decide to go this route, I might jump in. Don't know for sure yet, but if we decide to pursue Mustache-templates for the thing I'm working on here, this seems like the best starting point for that. 🙂

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