-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Patch fixes #6755
Patch fixes #6755
Conversation
## API Changes
unknown top level export { type: 'any' } @react-aria/collectionscreateLeafComponent createLeafComponent<E extends Element, P extends {}> {
type: string
- render: (P, ForwardedRef<E>, any) => ReactNode
+ render: (P, ForwardedRef<E>, any) => ReactElement
returnVal: undefined
} createBranchComponent createBranchComponent<E extends Element, P extends {
children?: any
}, T extends {}> {
type: string
- render: (P, ForwardedRef<E>, Node<T>) => ReactNode
+ render: (P, ForwardedRef<E>, Node<T>) => ReactElement
useChildren: (P) => ReactNode
returnVal: undefined
} createHideableComponent createHideableComponent<P = {
}, T> {
- fn: (P, React.Ref<T>) => ReactNode | null
+ fn: (P, React.Ref<T>) => ReactElement | null
returnVal: undefined
} @react-aria/utilsscrollIntoView-
+getSyntheticLinkProps {
+ props: LinkDOMProps
+ returnVal: undefined
+} |
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.
LGTM
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.
Look good to me !
You save my life <3
getSyntheticLinkProps
alongside the newuseSyntheticLinkProps
. This way if someone pins to an older version of an upstream package like@react-aria/table
, but the caret dependency on@react-aria/utils
resolves to a newer version, the packages are still compatible.ReactElement
as the return type of components rather thanReactNode
. Support for returning types other than JSX elements existed in React since 16 but not in the types until 18. TypeScript will complain that a component can't be rendered as a JSX element at the usage site if a function component returns anything other than an element with old react versions. See @types/react Make it possible to render a string from a functional component DefinitelyTyped/DefinitelyTyped#20544.TabListStateContext
inTabPanel
so that nested tabs work and don't connect to the wrong state object. Added test and story.@react-stately/virtualizer
from@react-types/sidenav
. Not sure why it was even there and that package is unused, but it caused multiple versions to be installed in our mono repo.