bem-react icon indicating copy to clipboard operation
bem-react copied to clipboard

withNaming - default modifier's delimiter is undefined

Open ViieeS opened this issue 5 years ago • 1 comments

Example

If I call it like this:

const cn = withNaming({e: '__'});
cn('bl')('el', { mod: 'val' });
// -> bl__elundefinedmodundefinedval

It only works if I explicitly specify the modifier

withNaming({e: '__', m: '_'});

ViieeS avatar Jun 11 '20 21:06 ViieeS

can be fixed with https://github.com/bem/bem-react/compare/issues/561?expand=1

but I don't think it should be fixed actually. as there's no such thing like default mod delimiter (there's default naming preset though) and providing such fallback will increase package size with almost no reason.

tadatuta avatar Jun 18 '20 21:06 tadatuta