Skip to content

Conversation

davbrito
Copy link

The following snippet was triggering eslint react-hooks/purity error:

const width = React.useMemo(() => {
return `${Math.floor(Math.random() * 40) + 50}%`
}, [])

This rule violation can introduce issues with the react compiler.

I replaced the useMemo with an useState as suggested in the react docs site.

Copy link

vercel bot commented Oct 15, 2025

@davbrito is attempting to deploy a commit to the shadcn-pro Team on Vercel.

A member of the Team first needs to authorize it.

Copy link
Contributor

Looks like this PR modifies files in apps/www, which is deprecated.

Consider applying the change to apps/v4 if relevant.

Copy link
Contributor

Looks like this PR modifies files in apps/www, which is deprecated.

Consider applying the change to apps/v4 if relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant