This repository has been archived by the owner on Feb 6, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
React.Element<any> / React.Element<*> -> React.Node as much as possible
Summary: Most of the time when people annotate something with `React.Element<any>` or `React.Element<*>` they don't really care about it really being a React element, and would be just as happy with `React.Node`. The exceptions I encountered when writing this diff were: 1) places where people do `React.cloneElement` -- in that case we of course need an element 2) components that want some of the props or children to be a certain component type -- but in those cases we ought to specify the type of element rather than accepting `any` or `*` As such, it's reasonable to replace `React.Element<any>` and `React.Element<*>` if doing so does not cause any Flow errors, and this should put a noticeable dent in our usage of unsafe Flow types. Reviewed By: camspiers, stryju Differential Revision: D7810983 fbshipit-source-id: d28f645a63cdfbae74370817e36c5bf590f543d6
- Loading branch information