04.07.2019 Views

frontend-developer-1

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Customize and Create JavaScript<br />

6.7 UNDERSTANDING DEPENDENCY<br />

BETWEEN COMPONENTS<br />

Demonstrate an understanding of the links, imports, exports, and<br />

listens UiComponent configuration directives.<br />

Links, imports, exports, and listens are how UI components share data between<br />

themselves. Having an understanding of each of these pieces will simplify your<br />

development responsibilities.<br />

Some of the examples in this section have been adapted from Mage2.tv’s discourse<br />

on the matter. These videos have greatly augmented my knowledge in this area.<br />

HELPFUL LINKS:<br />

• https://devdocs.magento.com/guides/v2.2/ui_comp_guide/<br />

concepts/ui_comp_linking_concept.html<br />

tracks:<br />

In order for a property to be updateable by the following methods, you must add<br />

this property to the defaults.tracks object. This converts each property<br />

specified in the object or array into an observable property.<br />

imports:<br />

imports is an object that resides in a UiComponent’s defaults object. It<br />

retrieves data from another UI Component and assigns that to a property in the<br />

Copyright © 2018, SwiftOtter, Inc.<br />

98

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!