Using Component.find vs Document.getElementById to Dynamically Hide or Show Content in Lightning Components
Business Scenario: To dynamically Show or Hide content in Lightning Components. Using "Document.getElementById" Below are Component and Controller code to show or hide content by using Document.getElementById HideShow.cmp <aura:component implements= "force:appHostable,flexipage:availableForAllPageTypes,flexipage:availableForRecordHome,force:hasRecordId,force:lightningQuickAction" access= "global" > < ! --Set component attribute--> <aura:attribute name= "valSet" type = "Set" /> <center> < ! --Button to display Set values--> <lightning:button onclick= "{!c.getSetValues}" label= "Set Values" /> </center> < ! --Construct HTML Table using SLDS--> <table class= "slds-table slds-table--bordered slds-table--striped slds-table--cell-buffer slds-table--fixed-layout" > <thead> <tr c...