Describe the bug
The Typescript type definition specifies the children of the FeatureHub provider to be a JSX.Element. While this is true in most cases, the more accurate representation is ReactNode which can express things that React is willing to accept as children, like strings, numbers, booleans, etc. (see here for reference: https://www.totaltypescript.com/jsx-element-vs-react-reactnode). While this is a nitpicky thing, it does make for a conflict with some strict type systems.
Which area does this issue belong to?
[x] SDK
[ ] SDK examples
[ ] Documentation
[ ] Other
To Reproduce
Steps to reproduce the behavior:
Use typescript
In a component, add something like:
return (
<FeatureHub url="..." apiKey="...">{"Foo Bar Baz"}</FeatureHub>
)
See tsc fail, even though this is a valid (albeit contrived) example.
Describe the bug The Typescript type definition specifies the children of the FeatureHub provider to be a
JSX.Element
. While this is true in most cases, the more accurate representation isReactNode
which can express things that React is willing to accept as children, like strings, numbers, booleans, etc. (see here for reference: https://www.totaltypescript.com/jsx-element-vs-react-reactnode). While this is a nitpicky thing, it does make for a conflict with some strict type systems.Which area does this issue belong to?
To Reproduce Steps to reproduce the behavior:
tsc
fail, even though this is a valid (albeit contrived) example.Expected behavior
tsc
would properly typecheck.Versions