Best practices for "context-less" partials

Some partials don’t need a context. And for those, I took the habit of passing the . which often is the page.

I wonder if it has any impact on performance, build time, and if passing an empty string wouldn’t be better…

Build time is not consistent with one of the other, so I’m asking here :wink:

1 Like

I’m guessing a little, but …

  • I’m pretty sure the runtime difference is neglible
  • If I would micro-guess, I would guess that passing a page vs a string would be 1 less allocation for the page variant, a drop in the sea.

I have the habit of passing the page to these partials. I do that just in case I in the future need it, then I do only need to change the partial.


Thanks. You confirmed my feeling.

1 Like