Open belozer opened 5 years ago
not work
// Block/_mod/Block_mod@desktop import { withMod as withModBase } from './mod'; import { blockModRegistry } from './Block_mod.registry/desktop'; import { withRegistry } from '@bem-react/di'; export const withMod = withRegistry(blockModRegistry)(withModBase);
Good
// Block/_mod/Block_mod@desktop import { withMod as withModBase } from './mod'; import { blockModRegistry } from './Block_mod.registry/desktop'; import { withRegistry } from '@bem-react/di'; import { compose } from '@bem-react/core'; export const withMod = compose(withRegistry(blockModRegistry), withModBase);
Все верно, withRegistry и withBemMod возвращают не компонент, а ХОК, есть же даже сигнатура в ts про это
withRegistry
withBemMod
@yarastqt да. Я к тому, что в доке это нужно описать (как мне кажется).
not work
Good