1.0.0-beta.13 • Published 10 months ago
@klnjs/react-core v1.0.0-beta.13
@klnjs/react-core
A library that simplifies implemention of React components that support the asChild paradigm. Ensures full TypeScript support for component props, and refs.
Installation
Install the @klnjs/react-core package using your preferred package manager.
npm install @klnjs/react-coreHow to Use
import { poly, forwardRef, type CoreProps } from '@klnjs/react-core';
export type MyComponentProps = CoreProps<
'div',
{
myCustomProp: string;
}
>;
export const MyComponent = forwardRef<'div', MyComponentProps>(
(props, forwardedRef) => <poly.div ref={forwardedRef} {...props} />
);1.0.0-beta.11
12 months ago
1.0.0-beta.12
11 months ago
1.0.0-beta.13
10 months ago
1.0.0-beta.7
1 year ago