Skip to navigation

Visibility versus conditional rendering

View as Markdown

When to use visibility versus conditional rendering to hide, show, or conditionally include elements in an experience.

There are two ways to control whether content appears in an experience:

UseFeature
Hide or display an existing element while keeping it on the pageVisibility
Add or remove elements from the rendered page based on a conditionConditional rendering

Visibility hides an element by changing its display behavior while keeping it part of the page. Conditional rendering prevents the element from being rendered until the specified condition is met, which can improve performance and avoid unnecessary processing for dynamic applications.