3

Refer to the file -

vendor\magento\module-ui\view\base\requirejs-config.js

You will see code in map like -

uiCollection:   'Magento_Ui/js/lib/core/collection',
uiComponent:    'Magento_Ui/js/lib/core/collection',

What is the difference between these two and how are they mapped?

2

My take on this is a UI component is the name given to a UI element or collection of elements, such as a form, button, modal etc.

And the UI Collection is the Javascript you use to build a UI component (or collection of them).

I'm not too sure why there are two files mapped to the same file, this doesn't sound great practice as it promotes inconsistency.

More info can be found in the docs:

  • Thanks for the answer. I have reviewed the links shared, all I was concerned about why the name is same. And how to use this. – LAW Aug 14 '18 at 10:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.