What are the Slack Archives?

It’s a history of our time together in the Slack Community! There’s a ton of knowledge in here, so feel free to search through the archives for a possible answer to your question.

Because this space is not active, you won’t be able to create a new post or comment here. If you have a question or want to start a discussion about something, head over to our categories and pick one to post in! You can always refer back to a post from Slack Archives if needed; just copy the link to use it as a reference..

Hello πŸ™‚ I am using standard Spryker's fronted (with twig and components). I h

USZB5JN4W
USZB5JN4W Posts: 112 πŸ§‘πŸ»β€πŸš€ - Cadet

Hello πŸ™‚
I am using standard Spryker's fronted (with twig and components). I have to create some reactive element.. let's say it's similar to todo list with add and remove item. Problem is that these items are custom components and after cloning they are not initialized. I could use invoke mountCallback method, but then subcomponents are not initialized. Is there any 'Spryker way' for cloning custom components?

Comments

  • Yuriy Gerton
    Yuriy Gerton Front End Technical Lead Sprykee Posts: 49 πŸ§‘πŸ»β€πŸš€ - Cadet
    edited January 2021

    Hello!
    You should use mount(); from import { mount } from 'ShopUi/app'; to initialize all new components on the page.

  • USZB5JN4W
    USZB5JN4W Posts: 112 πŸ§‘πŸ»β€πŸš€ - Cadet

    thanks! πŸ™‚