recompose
recompose copied to clipboard
Option not to set displayName on HOCs
We switch to withProps
from doing it the old fashioned way with a custom component. But all our Jest snapshots changed because withProps
added a displayName
that we didn't need. I looked at the source and the library adds the displayName for process.env.NODE_ENV !== 'production'
- code here
I suggest an option to turn this off, rather than checking env variables. This way we could avoid modifying our snapshots when adding recompose helpers. If anyone likes this idea, I can submit a PR.