hadijaveed / reactive-handlebars

A miniature library to update handlebars templates reactively.
7 stars 2 forks source link

Any support for Partials? #2

Open drone1 opened 4 years ago

drone1 commented 4 years ago

Hey again.

While you make it quite clear this is more for a simple one-pager type app, that is pretty much what I'm using it for and I'm having a hard time figuring out a way to actually make use of it, since changing a template var causes the entire template to re-render, and there doesn't seem to be support for reactive partials.

I've got a simple page that plays video. Below the video there are some tabs for the user to click through. However, the way it's currently implemented, changing my tab template variable just re-renders the entire page, which of course interrupts the video.

Any way you're aware of that I can re-render only my tab area, with partials or something like this? Otherwise I guess I'll just have to always render all tabs and then show/hide using Javascript. :/

Thanks for any help.

hadijaveed commented 4 years ago

@drone1 yeah this library don't support partials at the moment. Since it was a small library to support HBS templates. I can work on it though.

drone1 commented 4 years ago

I bit the bullet and used jquery. Would love support for partial reactive rendering!

On Tue, Feb 18, 2020 at 18:15 hadi javeed notifications@github.com wrote:

@drone1 https://github.com/drone1 yeah this library don't support partials at the moment. Since it was a small library to support HBS templates. I can work on it though.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/hadijaveed/reactive-handlebars/issues/2?email_source=notifications&email_token=ABQIEPCOBTWEROPZSSOD3TDRDQJRNA5CNFSM4KW6JSOKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEMC2KCY#issuecomment-587572491, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABQIEPGRZZ2IJ63Z6NTW5N3RDQJRNANCNFSM4KW6JSOA .