Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix AnyComponent with ComponentConstructor
- Loading branch information
Showing
2 changed files
with
5 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42c92b6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is wrong. Cause We already have ComponentFactory. So previously there was ComponentFactory for factories, and AnyComponent for instances of Component. And now they are both the same.
42c92b6
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ComponentFactory
was introduced in8.3.0
, prior to thatAnyComponent
was used.See: https://github.com/developit/preact/blob/8.2.7/src/preact.d.ts#L53
With
8.3.0
,AnyComponent
could no longer be used for class components, so this just fixes a breaking change.