←back to thread

379 points rbanffy | 1 comments | | HN request time: 0.209s | 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 #
agumonkey ◴[] No.46211247[source]
indeed the vintage templating was a logical bottleneck
replies(1): >>46211347 #
f311a ◴[] No.46211347[source]
How is it different from include? Just less files from my perspective
replies(3): >>46211378 #>>46211408 #>>46214371 #
1. agumonkey ◴[] No.46214371[source]
you're kinda right, {% partial ... %} vs {% include ... %} is not a big difference, but my mind was vaguely thinking that "includes" have often been seen as large templates, whereas partial have been after the component era with the idea of making small blocks. (my 2 cents)