Sunday, February 5, 2017

What are Nested components and component composition in lightning?

What are Nested components and component composition in lightning?

Component composition is nothing to use to ease the process.  Let’s say if you have 3 to 4 components so instead of calling all those components into your application what we do is create another component which is knows as nested component or wrapper component which calls all these components in itself and then in the application finally we can call that wrapper/Nested component only.

To save our time we are going to use this a lot in lightning applications.  Here is the example

I have 2 components as shown below

Component 1 :  LC.cmp 

Component 2 :  LC2.cmp

Wrapper Component / Nested Component:

Application:  Here I am including/adding that wrappercomponent in my NestedComponent application.

Finally what I am doing here is instead of calling LC,LC2 components, I am calling wrappercomponent that includes booth LC,LC2 components.

Once you click on the preview of your application you can see this output.


Karthi Keyan said...

Its fantatic explaintion lot of information gather it...nice article....
seo company in Chennai

akhila priya said...

I really enjoy the blog.Much thanks again. Really Great salesforce Online Training Hyderabad

akhila priya said...

I have read your blog its very attractive and impressive. I like your blog. salesforce Online Training Hyderabad

phuloo Nikola said...

Thanks a lot for the post. It has helped me get some nice ideas. I hope I will see some really good result soon.

jhon lofar said...

I think this article done a great job.What a best way to describe your view. Thanks for sharing with us. Really like your informative article.

Post a Comment

| ,