- By browser events like onclick, onchange etc
- By Aura handlers of lifecycle events init handler, render handler
- By Aura handlers of component and application events
- By Aura Method
- Component – Component or markup file reference
- Event – It has all the properties of the event which fired this method
- Helper – Helper file reference
These parameters are supplied by the framework itself and does not need to be passed explicitly.
12. Can we call one helper method from other helper method?
13. What are different events fired during component rendering lifecycle?
During component rendering, there are several events which gets fired.
- Init event – The component service that constructs the components fires the init event to signal that initialization has completed.
- Render event – This event is called when component starts rendering. You can override this either by handling this event, or by creating custom renderer resource file.
- After render – This event is called once rendering is completed.
14. What is inheritance in Lightning framework?
Lightning framework allows you to extend another component. When a component extends another component, we refer to sub and super components in the inheritance hierarchy. This inherits super components properties and make them available to sub component.
15. What is inherited?
When one component extends another, it inherits super component’s attributes, events, controller and helper. You can use all these properties in your sub component.
16. What are the general steps to implement inheritance?
To implement inheritance, you need to complete below steps:
- Create a parent component and make it extensible. This will allow your component to be inherited by other components.
- Create another component and extend first component.
I hope these questions would help you in refreshing your concepts and clearing an interview. Keep reading more questions in next intreview posts.