4 ms·
Not really an htmx user or supporter but as an outside observer I think this can be accomplished but it might not be what you want -- which is okay. So, if I u
by davidjfelix 3y ago
Not really an htmx user or supporter but as an outside observer I think this can be accomplished but it might not be what you want -- which is okay.
So, if I understand correctly, I think what you're saying is you "create a post" and the timestamp might have "now" listed as a humanized representation of it being just posted. When it reaches 1 minute, what you're saying is you'd like it to say "1 minute ago" etc. I think this is generally against the goals of htmx and the way you'd accomplish this is one of two ways:
* Find a humanized representation that does not need constant updating
* Use ordinary clientside javascript alongside htmx rendered data attributes to update the output.
I don't think htmx aims to do loads of rerender cycle updates like this. I don't think that means its not a good library, just not a good fit for sites that need this. There are plenty of tools like django templates, rails templates, hugo sites etc that all act like this and require some hand-authored clientside js to handle updates. I think the goal of htmx is to require *as few as possible* without overtly adding js to clientside runtimes.