maicki/why-did-you-update

Document default exclude

OliverJAsh opened this issue · 3 comments

I was surprised to find that none of my components created via HOCs were being logged.

This appears to be because the default exclude includes only alphanumeric characters:

export const DEFAULT_EXCLUDE = /[^a-zA-Z0-9]/

Components created through HOCs often have brackets in them, for example pure(MyComponent).

Can we document the default exclude so this behaviour is less surprising?

@OliverJAsh I just pushed to master to add brackets to the default exclude. This should fix this issue. Thanks for bringing it up.

@maicki Would you accept a PR to add a note somewhere in the docs about the DEFAULT_EXCLUDE?

The behaviour can be quite surprising if you don't know there is one.

@OliverJAsh Yes for sure!