Renderer in Client-side is to override default rendering for a component. You can consider what data should render on load or on reload. The framework’s rendering service takes in-memory component state and creates and manages the DOM elements owned by the component. If you want to modify DOM elements created by the framework for a component, you can modify the DOM elements in the component’s renderer. Otherwise, the framework will override your changes when the component is rerendered.
The base component in the framework is aura:component. Every component extends this base component.
This renderer has base implementations for the four phases of the rendering and rerendering cycles:
Continue reading “Renderer in Lightning Bundle”
Continue reading “Helper in Lightning Bundle”
- Helper is similar to controller but helper does not handle events.
- Helper functions also enable specialization of tasks, such as processing data and queueing server-side actions.
- Helper methods are local to Component bundle.
- A helper function can pass in any arguments required by the function, such as the component it belongs to, a callback, or any other objects.
- You can call a helper method from another helper method using this. operation.