Skip to content
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

Upgrade hoist-non-react-statics to v3.3.0 #1502

Merged

Conversation

matomesc
Copy link
Contributor

@matomesc matomesc commented May 9, 2019

This pull request is meant to fix issues arising from older versions of hoist-non-react-statics hoisting the contextType static property when using the connect() or withFormik() HOCs:

Warning: FormikConnect(ComponentInner): Function components do not support contextType.

This issue was fixed in hoist-non-react-statics@3.1.0 in mridgway/hoist-non-react-statics#62

@jaredpalmer jaredpalmer merged commit fc36095 into jaredpalmer:master May 16, 2019
@bopfer
Copy link

bopfer commented May 17, 2019

I am getting this error when upgrading to the latest alpha (2.0.1-alpha.51):

node_modules/formik/dist/ErrorMessage.d.ts:1:23 - error TS2688: Cannot find type definition file for 'hoist-non-react-statics'.

1 /// <reference types="hoist-non-react-statics" />

node_modules/formik/dist/ErrorMessage.d.ts:11:88 - error TS7016: Could not find a declaration file for module 'hoist-non-react-statics'. '/myproject/node_modules/hoist-non-react-statics/dist/hoist-non-react-statics.cjs.js' implicitly has an 'any' type.
   Try `npm install @types/hoist-non-react-statics` if it exists or add a new declaration (.d.ts) file containing `declare module 'hoist-non-react-statics';`

11 export declare const ErrorMessage: React.FunctionComponent<ErrorMessageProps> & import("hoist-non-react-statics").NonReactStatics<React.ComponentClass<ErrorMessageProps & {

Is that something I would need to install separately from Formik? or is it something that needs to be added to Formik's dependencies?

@jaredpalmer
Copy link
Owner

Will investigate

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants