react-helmet-async icon indicating copy to clipboard operation
react-helmet-async copied to clipboard

fix(types): Datum.toComponent() should return ReactElement instead of Component

Open Josh-Cena opened this issue 3 years ago • 4 comments

React.Component is something like function Comp() {...} or class Comp extends Component, while React.ReactElement is like <Comp />, the "return value" of a component. This has blocked me from doing something like React.Children.toArray(datum).

Josh-Cena avatar Apr 09 '22 14:04 Josh-Cena

@staylor Could you take a look at this, please?

Josh-Cena avatar May 05 '22 02:05 Josh-Cena

FWIW the same fix was made to react-helmet. https://github.com/DefinitelyTyped/DefinitelyTyped/commit/b0ff447be35d1e3ca9b4b41e66ec55059f6dc17e

OliverJAsh avatar Oct 04 '22 12:10 OliverJAsh