react-shallow-renderer icon indicating copy to clipboard operation
react-shallow-renderer copied to clipboard

Allow .contextType on class based components

Open unverbraucht opened this issue 3 years ago • 2 comments

Hi all,

the patch posted on https://github.com/enzymejs/enzyme/issues/2189 adds support for class based components that pass the context via .contextType. This is the part of the patch that applies to react-shallow-renderer.

unverbraucht avatar Mar 14 '21 14:03 unverbraucht

@pablopalacios i've updated the PR, but there's still no tests or anything.

ljharb avatar Oct 07 '22 18:10 ljharb

@ljharb I've updated my branch with the tests. I also renamed the tests that are using the legacy contextTypes property.

pablopalacios avatar Oct 08 '22 21:10 pablopalacios