Does NgRx Component Store turn dumb components into smart ones?

Discussão em 'Angular' iniciado por Ahmed-El-Bald, Novembro 29, 2024.

  1. The idea of smart and dumb (aka presentational) components is great, and I depend on it to structure my code properly. However, in this article, the team of NgRx are using the Component Store to manage the state of a toggle component. Personally, I think a toggle component is dumb. All it does is emitting its new value when toggled.

    My question:


    Does that justify using the Component Store in a dumb component? And does that make it a smart one?
    However, they mentioned they are using it to manage the local UI state. So, is this the only case we can use a store in a dumb component?

    Continue reading...

Compartilhe esta Página