Hello Everyone , I am Creating new molecule in Yves in which which I have implement the actual code

U04SKM4JAEQ
U04SKM4JAEQ Posts: 8 🧑🏻‍🚀 - Cadet
edited June 2023 in Spryker Development

Hello Everyone , I am Creating new molecule in Yves in which which I have implement the actual code that will count the elements. while extending the Component base class defined in the shopUI module.I have import the base class. like this( import Component from 'ShopUi/models/component';) but it is giving me an error that cannot find module.and also when I open the shop it is showing the following error. please help me out to find what mistake i am doing.

Comments

  • Hidran Arias
    Hidran Arias Senior Technical Trainer Sprykee Posts: 86 🏛 - Council (mod)

    if you want to extend a component, you can use the extend method: for example

    {% extends molecule('autocomplete-form', '@SprykerShop:ShopUi') %}
    

    for the base component:

    {% extends model('component') %}
    

    you have helper methods for components, organisms etc.
    Take a look at the academy’s course “Spryker Frontend for Backend Developers” where we explain how to create a new component, widgets etc