yandex / reselector

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

Different (and nonexistent) testId hash for default exported component #16

Open a-omsk opened 6 years ago

a-omsk commented 6 years ago
export default class Abc extends Component {}
...
const {default: AbcSelector} = resolve('...')

gives me the different testId compared with

class Abc extends Component {}
export default Abc
...
const {Abc: AbcSelector} = resolve('...') 

In first case testId-attribute not presented in the DOM, second case works correctly

nickshevr commented 6 years ago

It is my mistake, https://github.com/lttb/reselector/blob/master/src/utils.js#L55 Should update this logic, i'll do it soon

nickshevr commented 6 years ago

@a-omsk I've add test for these cases, check it https://github.com/lttb/reselector/pull/18 I think ur problem was fixed in https://github.com/lttb/reselector/releases/tag/v0.9.2