You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
render() {
const i = 0;
return <Component>{i}</Component>
}
Then in Component typeof this.props.children === 'string'.
In React the type is still a Number.
I can of course parse the result but I guess this is something that has to be fixed?
Thanks for this project!
The text was updated successfully, but these errors were encountered:
That's an interesting one. Preact normalizes types, but I guess maybe we should be skipping that normalization for components, instead only applying it to element VNodes.
Well, that normalization breaks compatibility I guess...
In my App it throws because I'm already assuming I get a Number.
What is the underlying reason for that normalization?
It simplifies the diff and avoids passing too many types through the algorithm in order to keep IC size down. That said, it's only number and string now, booleans are always removed.
Suppose:
Then in Component
typeof this.props.children === 'string'
.In React the type is still a Number.
I can of course parse the result but I guess this is something that has to be fixed?
Thanks for this project!
The text was updated successfully, but these errors were encountered: