[PR #25548] Refactor use over use context #31114

Open
opened 2026-02-21 20:48:51 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/langgenius/dify/pull/25548

State: open
Merged: No


Summary

This PR addresses #25193

  • Migrates all relevant React context usage from useContext to the new use hook as recommended.
  • Type errors encountered during migration were resolved using safe type assertions
    (as any) only where necessary.
  • All lint, TypeScript and unit tests pass after these updates.

Screenshots

N/A

Checklist

  • This change requires a documentation update, included: Dify Document.
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!).
  • All relevant existing tests pass for the changes introduced.
  • I've updated the documentation accordingly.
  • Ran pnpm lint and pnpm test .
**Original Pull Request:** https://github.com/langgenius/dify/pull/25548 **State:** open **Merged:** No --- ## Summary This PR addresses #25193 - Migrates all relevant React context usage from **useContext** to the new **use** hook as recommended. - Type errors encountered during migration were resolved using safe type assertions `(as any)` only where necessary. - All lint, TypeScript and unit tests pass after these updates. ## Screenshots **N/A** ## Checklist - [ ] This change requires a documentation update, included: [Dify Document](https://github.com/langgenius/dify-docs). - [x] I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!). - [x] All relevant existing tests pass for the changes introduced. - [x] I've updated the documentation accordingly. - [x] Ran `pnpm lint` and `pnpm test` .
yindo added the pull-request label 2026-02-21 20:48:51 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: langgenius/dify#31114