

You write those methods in the helper which are basically reusable and may be required to be called multiple times. The methods defined inside the helper can be called from the controller and renderer, hence making it more reusable. Helper contains the javascript code for your component just like your controller but the purpose of the helper is to segregate the calls to the server. It calls the doInit method that runs before your component Html content is loaded, doInit is not required in all components. ControllerĬontains the javascript code for your component to call the action events declared in the lightning component. Whenever you start building your component code, the root tag for the component will be tag and you can design the component using other available aura tags. Resources of a lightning component bundleĬontains the Html like code for a component along with some lightning tags. The javascript code is written in the controller, helper, and renderer part of the component bundle. The component uses JavaScript on the client-side and Apex on the server-side.

A basic lightning component contains the design of a page in Html with some lightning tags. The bundle contains all the required resources related to a component like javascript controller, javascript helper, renderer, CSS styles, etc. Once created a created lightning component is a bundle of code.

A component is a user interface developed using HTML, CSS, JavaScript, and other Web-enabled code.

In Salesforce using Lightning components, a developer can build applications and pages by assembling components created by other developers.
