Search for a command to run...
Add follow/unfollow functionality to user profiles.
Add these to your .env before installing. The CLI runs Prisma generate and migrate using these values during install — add them first, or the install will fail partway through.
DATABASE_URLrequiredPostgreSQL connection string.
e.g. postgresql://user:pass@localhost:5432/mydbnpx feature101@latest add follow| Prop | Type | Default | Description |
|---|---|---|---|
targetUserId* | string | — | ID of the user being followed. |
showCount | boolean | true | Display follower count next to the button. |
className | string | — | Custom CSS classes for styling. |
onFollowChange | (isFollowing: boolean) => void | — | Callback fired with real server result on confirm only. Never fires on optimistic update or rollback. |