Likely to cause new Flow errors:
- When component syntax is enabled, hook calls happen inside an upper case function that doesn't have a
propsparam that's a subtype ofinterface {}will getreact-rule-hook-definitely-not-in-component-or-hookerror. - Calling a function that's a union of hook and non-hook will now get
react-rule-hook-mixed-with-non-hookerror instead ofreact-rule-hookerror. Calling functions named like hook but not in hook syntax will now getreact-rule-hook-non-hook-syntaxinstead ofreact-rule-hookerror.
Notable bug fixes:
- Go-to-definition on default import of
module.exportswill correctly jump to the exporting file
Parser:
- Fix crash on
''#!/usr/bin/env node\n''when generating token list
Library Definitions:
React.forwardRefis marked as deprecated. We might remove it from our builtin libdef in the future.