If I have a parent lightning component and the component has ltng:require
do I need to require the same libraries from the children components or will the inclusion be propagated to children?
For example the parent lightning component has the following tag inside it:
<ltng:require scripts="{!join(',', $Resource.fooLib1, $Resource.fooLib2)}"/>
If I want to be able to access the fooLib1
in the child component do I need have the following tag in the child:
<ltng:require scripts="{!$Resource.fooLib1}"/>
?
Are there any performance difference? Will the Lightning optimize such inclusions and include the libraries only once (in case the propagation happens in Lightning and in case it is present)?
I tried to google that, but found nothing about it. Will be grateful for any information source provided.