Skip to content

Memoize useQuickActions internally, make useMemo unnecessary at callsites#3132

Open
david-crespo wants to merge 1 commit intoquick-actions-refactorfrom
memoize-quick-actions
Open

Memoize useQuickActions internally, make useMemo unnecessary at callsites#3132
david-crespo wants to merge 1 commit intoquick-actions-refactorfrom
memoize-quick-actions

Conversation

@david-crespo
Copy link
Collaborator

@david-crespo david-crespo commented Mar 18, 2026

Split out from #3131 because it's completely mechanical and all noise.

TIL additionalHooks, which lets you opt your own hooks into the dependency checking the linter does for useEffect and useMemo. This means we can turn useQuickActions into something that takes a function and a dep array and skip the useMemo. This is better because there was nothing preventing you from just forgetting the useMemo. Now it's built in. And it works: if you take one of the deps out of one of the arrays, you get the lint error.

The diff is very small if you hide whitespace changes.

@vercel
Copy link

vercel bot commented Mar 18, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
console Ready Ready Preview Mar 18, 2026 3:28am

Request Review

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant