Skip to content

refactor(web): replace native useContext with use in shared components 🤖🤖🤖#34513

Draft
Jholly2008 wants to merge 1 commit intolanggenius:mainfrom
Jholly2008:kkk/refactor-25193-use-hook-batch
Draft

refactor(web): replace native useContext with use in shared components 🤖🤖🤖#34513
Jholly2008 wants to merge 1 commit intolanggenius:mainfrom
Jholly2008:kkk/refactor-25193-use-hook-batch

Conversation

@Jholly2008
Copy link
Copy Markdown

Summary

This PR contributes a small non-overlapping batch for #25193.

  • replace remaining React native useContext calls with use in three shared base components
  • keep behavior unchanged
  • avoid touching use-context-selector usage

Scope

  • web/app/components/base/carousel/index.tsx
  • web/app/components/base/pagination/pagination.tsx
  • web/app/components/base/portal-to-follow-elem/index.tsx

Validation

  • pnpm exec vp test run app/components/base/carousel/__tests__/index.spec.tsx app/components/base/pagination/__tests__/pagination.spec.tsx app/components/base/portal-to-follow-elem/__tests__/index.spec.tsx
  • pnpm run lint:ci app/components/base/carousel/index.tsx app/components/base/pagination/pagination.tsx app/components/base/portal-to-follow-elem/index.tsx
  • pnpm run type-check
  • pnpm run lint:tss

fixes #25193

@github-actions github-actions bot added needs-revision web This relates to changes on the web. labels Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-revision web This relates to changes on the web.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Chore/Refactor] 'use' is preferred over 'useContext' because it is more flexible

1 participant