bem / bem/bem-react

Matcher props must be required in the modifier's body

Open
#441 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
TypeScript
Stars
450
Forks
69
PR merge metrics
No merged PRs in 30d

Description

```
interface IRatingHintProps {
hint?: string;
}
```

Before:
``` tsx
export const withHint = withBemMod(
'Rating',
{ hint: '*' },
Rating => props => (


{props.hint && }

);
```

After:
``` tsx
export const withHint = withBemMod(
'Rating',
{ hint: '*' },
Rating => props => (




);
```

`props.hint` must be required in the body context, because modifier applied already and we don't need to check existing of matched prop.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.