yandex / reselector

Use React Components in css selectors
https://npm.im/reselector
Other
45 stars 10 forks source link

Ternary expression in component #14

Closed nickshevr closed 6 years ago

nickshevr commented 6 years ago

For components which declared like:

const Component = (props) => {
    const {flag} = props;

    return flag
        ? <div>smth</div>
        : <a>smth</a>
}

It doesn't set data attribute.

nickshevr commented 6 years ago

Also components which declared like:

const Component = (props) => {
    const {flag} = props;

    return flag && <div>smth</div>
}

Doesn't work as well.