You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to use ElementConfig thows the following in version 26.0.0:
ERROR in ./file.js
Module build failed (from ./node_modules/babel-loader/lib/index.js):
TypeError: /file.js: Cannot read property 'forEach' of undefined
at convertToPropTypes (/node_modules/babel-plugin-flow-react-proptypes/lib/convertToPropTypes.js:222:19)
at /node_modules/babel-plugin-flow-react-proptypes/lib/convertToPropTypes.js:164:22
at Array.forEach (<anonymous>)
at convertToPropTypes (/node_modules/babel-plugin-flow-react-proptypes/lib/convertToPropTypes.js:160:23)
at convertNodeToPropTypes (/node_modules/babel-plugin-flow-react-proptypes/lib/index.js:48:45)
at getPropsForTypeAnnotation (/node_modules/babel-plugin-flow-react-proptypes/lib/index.js:55:13)
at functionVisitor (/node_modules/babel-plugin-flow-react-proptypes/lib/index.js:452:121)
at PluginPass.ArrowFunctionExpression (/node_modules/babel-plugin-flow-react-proptypes/lib/index.js:601:16)
at newFn (/node_modules/@babel/traverse/lib/visitors.js:179:21)
at NodePath._call (/node_modules/@babel/traverse/lib/path/context.js:55:20)
The text was updated successfully, but these errors were encountered:
This seems very similar to #147. React now also provides
ElementConfig
that works almost the same asElementProps
but preserves the optionality of default props. Documentation at https://flow.org/en/docs/react/types/#toc-react-elementconfigTrying to use
ElementConfig
thows the following in version 26.0.0:The text was updated successfully, but these errors were encountered: