Likely to cause new Flow errors:
- Referencing a react-component typed value in type position will now create a
React$RendersExactly<typeof Component>
type instead ofReact$Element<typeof Component>
type. All existing usages intended to create an exact react element will now error as a result. Using it as type passed to render type,React.PropsOf
,React.PropOf
andReact.RefOf
is unaffected and will not be affected in the future. If you want exact react elements, the only way that doesn't trigger Flow error is byExactReactElement_DEPRECATED<typeof Component>
.
Library Definitions:
React.Config
type is marked as deprecated and will be removed soon. You can create your own equivalent type with
type ReactConfigShim<Props, DefaultProps> = $ReadOnly<{
...Omit<Props, $Keys<DefaultProps>>, ...Partial<DefaultProps>
}>;