Contents
What are the best practices for lightning components?
15 ways to improve performance of Lightning Components in Salesforce
- Use Storable Action.
- Use Lightning Data Service.
- Custom Cache.
- Lazy Instantiation of Component.
- Conditional rendering.
- Use of Unbound Expression.
- Use aura:method for Component Communications.
- Limit event handlers.
What are some steps you should follow when building your own lightning component to make sure it’s accessible?
If you do, follow these steps to make sure it’s accessible….Write automation and manually test your component.
- Correct semantics at the correct node.
- Correct attributes set on the correct node.
- Correct attribute values updated during component lifecycle.
What’s the best way to use Lightning components?
Use the Lightning Data Service or cache data whenever possible (see Data caching). Before making a call to the server, make sure there’s no other option to obtain the data. When appropriate, consider passing data between components using attributes, events, or methods rather than retrieving the same data in different components.
How to generate / View PDF using Lightning components?
There are two methods to show a PDF in Lightning Component. First, you can create a Visualforce page and embed it in the Lightning component. See detailed example here Second is, usage of PDF.JS library to directly use lightning component to display the PDF.
How long does it take to create lightning components?
Creating Lightning Components is a short, 60+ minute video course from Salesforce University where we demonstrate how to create and use simple Lightning Components.
The Lightning Data Service (currently in Developer Preview and in Beta in Summer ’17) also allows you to efficiently share data between components. Only SELECT the columns you need. Set a LIMIT on the query and provide a paging mechanism if needed. Don’t return huge numbers of rows at once.