Slot component causes a warning in React 19 about accessing `.ref` directly · Issue #2890 · radix-ui/primitives · GitHub
Bug report Current Behavior The Slot component accesses .ref on the element, which seems to be a no-no in React 19. The problematic line seems to be this one: https://github.com/radix-ui/primitives/blob/main/packages/react/slot/src/Slot....
Radix UI
An image element with a fallback for representing the user. ... Slot. ... import * as React from "react"; ... npm install @radix-ui/react-avatar.
React nâng cao bài 2: Render component layout linh hoạt ...
import React, { useContext, useMemo } from "react"; interface SlotProps { slot?: string; } let SlotContext = React.createContext(null); export function useSlotProps<T>(props: T, defaultSlot?
