-
-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shallow API setContext should work without static contextTypes
for React 16
#1913
Comments
enzyme doesn't yet support createContext at all (nor contextType) - see #1553. |
Ok, got it |
Just wanted to plug facebook/react#14329 - I put a PR out for the shallow |
I need working solution for |
According to the latest React documentation
static contextTypes
is no more needed for Context API to work - onlystatic contextType
(single form here) is needed https://reactjs.org/docs/context.html#classcontexttypeCurrent behavior
Enzyme for React 16 still requires
static contextTypes
to be defined to makesetContext()
work.Expected behavior
Enzyme for React 16 should only rely on
static contextType
.Your environment
API
Version
Adapter
The text was updated successfully, but these errors were encountered: