In terms of showing/hiding sections based on selection or urls eg for SPAs, then using Show/Hide isn't great as it actually removes the element from the DOM completely when hidden and then reloads it completely once shown again. If you're using components, then this resets the state you had in the component (variables) and calls the On Load event again.
The best way to handle that is to have the Default style's Display property set to None and then use a style class to have a Visible class eg based on whether the url path is set for the element to be shown, and in that class set's it's Display to Flex. This way the On Load of the component is triggered once, when the page is loaded, and not triggered again and the variables are never reset and the component is loaded up-front and simply shown and hidden rather than removed and reloaded.