Template Partials in Statamic and WordPress
Template partials is virtually a given in any modern web framework, neither WordPress nor Statamic are exceptions to this rule; there are, however, some differences in how they work. In WordPress, we can call our partial and pass in some data, but that’s about it.
With Statamic, we get a lot more flexibility. We get the power of passing in props-like data, initial data values and fallback using Frontmatter, as well as slots for arbitrary code.
I published a video on YouTube going comparing the differences. Watch it here:
I love the flexibility, don’t you?