-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
experimental.well_formed_exports is on by default in React Native 0.62, yet has unclear error messages and is undocumented #8279
Comments
Thanks for bringing this up @jamesisaac ! I'll remove these flags from the template, at least until we formally announce types-first mode, and update the necessary documentation. |
@panagosg7 Ok, great! Looking forward to hearing more about Types First when it gets closer to release. Even with a commit on master removing them from the template, I think you'd need to also get the commit cherry picked into 0.62 (react-native-community/releases#157) otherwise the template will ship as is, as it's already in RC stage. |
Sure! I'll request the pick once the fix is landed. |
Summary: Removing the experimental types-first flag from RN templates, until these are properly documented in the docs. See facebook/flow#8279 for context. Changelog: [Internal] Reviewed By: jbrown215 Differential Revision: D19728257 fbshipit-source-id: 8f7473b9c8383bd1eef76b5733ff3a26e2e554fc
Summary: Removing the experimental types-first flag from RN templates, until these are properly documented in the docs. See facebook/flow#8279 for context. Changelog: [Internal] Reviewed By: jbrown215 Differential Revision: D19728257 fbshipit-source-id: 8f7473b9c8383bd1eef76b5733ff3a26e2e554fc
Fixed in the latest RC 👍 react-native-community/releases#157 (comment) |
Summary: Removing the experimental types-first flag from RN templates, until these are properly documented in the docs. See facebook/flow#8279 for context. Changelog: [Internal] Reviewed By: jbrown215 Differential Revision: D19728257 fbshipit-source-id: 8f7473b9c8383bd1eef76b5733ff3a26e2e554fc
This commit (cc @panagosg7 ) has added these config options to the default
.flowconig
template in new React Native projects starting from 0.62:From what I can see, neither of these options are documented anywhere (would expect them to be here).
The issue I think people will have with
experimental.well_formed_exports=true
, is that it will introduce hundreds of errors into any mature codebase. The Flow docs for React components suggest to type functional components like so:This will lead to an error under
well_formed_exports
, as (from what I understand) they need to be typed like so:The error message doesn't even make it clear that this option is the reason. It makes it sounds like it's the lint rule's fault (
signature-verification-failure=warn
), but turning that tooff
makes no difference:The only way I was able to remove these hundreds of new errors (as I didn't have time to update hundreds of export signatures), was process of elimination trying disabling various lines in the flowconfig until the errors disappeared.
The text was updated successfully, but these errors were encountered: