Downside of not rendering a region in twig template? Suppose we want to use a different layout/blocks in front page. I know there is a page visibility restriction feature in block configuration, and also  Page Manager and Panelsmodules exist, but what's the downside of this solution?


Define a specific region content-front in theme
Place some blocks in this this region
Render this region only in page--front.html.twig template


The above solution has some advantages: front-page blocks are listed separately from other blocks, no need to configure each block to be in &lt;front&gt; page (preventing a O(n) task), using native UI to arrange the blocks.

Edits:


hooks like hook_block_access or hook_preprocess_block will not be called for a block not being rendered.
Drupal won’t care and it won’t have any side effects other than the contents of a region not being rendered to a page whose template doesn’t render it


It's not quite that simple.

The problem with dynamically not rendering a region is that Drupal doesn't know about that. It will still load, check and prepare those blocks on every page, which means it is unecessary overhead compared to defining visibility rules to only have it shown on the frontpage. You can also do an empty check of the region in the template and as a result, only have it printed if there are blocks inside (this doesn't work reliably with blocks that might be shown but might be empty but it should work if they are configured to not be shown).

You could also implement a hook_block_access() implementation and deny view access for all blocks in a certain region, then you don't need to manually configure them all, but it does need to be in a module.