Difference between conditional "display" and "Conditional rendering"?

I thought that if I want to conditionally show or hide elements, I should use the built-in “Conditional rendering” feature.

Yet, for modals, as far as I know, the default feature used is “Display”, with a formula condition “if(true,true,false)”.

What’s the difference between these two approaches and which should be used when?

I’d like to use the most efficient feature and remain consistent in my approach.

1 Like

If you don’t display an element, it will be rendered by the browser and take up performance, but it will just be “hidden”, whereas conditional rendering won’t actually render the element in question

So for your use case, it depends: if it’s a very small thing that needs to appear and disappear often, use display; otherwise, use conditional rendering to save performance

1 Like