- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 252
Description
Is your feature request related to a problem? Please describe.
Currently, when generating a component using npx @react-native-reusables/cli@latest add [component], the generated import statements are always in the named import style. For example:
import { Avatar, AvatarFallback, AvatarImage } from '~/components/ui/avatar';
This results in a more verbose usage pattern. I’d prefer a cleaner, more intuitive API when using the components.
Describe the solution you'd like
I’d like an option in the CLI (e.g., a flag or config setting) to choose the component structure style.
Specifically, it should support default imports like:
import Avatar from '~/components/ui/avatar';
And the component usage would look like:
<Avatar alt="Zach Nugent's Avatar">
<Avatar.Image source={{ uri: GITHUB_AVATAR_URI }} />
<Avatar.Fallback>
<Text>ZN</Text>
</Avatar.Fallback>
</Avatar>
Describe alternatives you've considered
Manually rewriting imports and component usage after generation (not ideal for DX).
Creating a wrapper component to simulate this structure (adds unnecessary indirection).
Additional context
This approach aligns well with design systems like Radix UI or ShadCN where components follow a namespaced structure and are easier to reason about hierarchically.
Activity
mrzachnugent commentedon Aug 22, 2025
Hey @coolRoger cool idea but closing this issue as it is not planned.