←back to thread

379 points rbanffy | 1 comments | | HN request time: 0.198s | source
Show context
giancarlostoro ◴[] No.46210692[source]
Template partials look good, which is one of the key reasons frameworks like React are as good and popular as they are, because you can reuse small segments of code.
replies(8): >>46211187 #>>46211247 #>>46211354 #>>46211402 #>>46211982 #>>46212701 #>>46212849 #>>46213424 #
chistev ◴[] No.46211402[source]
But you could already reuse templates in Django by including them. What am I missing?
replies(3): >>46211411 #>>46212274 #>>46214475 #
1. JodieBenitez ◴[] No.46214475[source]
It's just syntactic sugar, making life a bit easier for HTMX users (cf. "htmx was the main motivation for this feature").

I'm using Unpoly and I just render the whole page and let Unpoly swap the content according to the target selectors, so no need for this. Not much difference in perf if you dont generate gigantic pages with heavy header/footer.