refactor: move @theme/hooks to @docusaurus/theme-common - #6289
Merged
Conversation
|
✔️ [V2] 🔨 Explore the source changes: 12f4d22 🔍 Inspect the deploy log: https://app.netlify.com/sites/docusaurus-2/deploys/61d87ef63199db00075a45e8 😎 Browse the preview: https://deploy-preview-6289--docusaurus-2.netlify.app |
|
⚡️ Lighthouse report for the changes in this PR:
Lighthouse ran on https://deploy-preview-6289--docusaurus-2.netlify.app/ |
|
Size Change: +998 B (0%) Total Size: 676 kB
ℹ️ View Unchanged
|
Collaborator
Author
|
This change is causing some issues in our plugin ecosystem I'm thinking we could provide a compatibility layer (webpack or js aliases) temporarily? 🤷♂️ |
Collaborator
|
I think it's fine... We are going to break them some time in the future anyways... |
5 tasks
antoniancu
pushed a commit
to Unity-Technologies/com.unity.multiplayer.docs
that referenced
this pull request
Mar 3, 2023
Per facebook/docusaurus#6289, @theme/hooks moved to @docusaurus/theme-common
antoniancu
pushed a commit
to Unity-Technologies/com.unity.multiplayer.docs
that referenced
this pull request
Mar 8, 2023
Per facebook/docusaurus#6289, @theme/hooks moved to @docusaurus/theme-common
mrizwanashiq
pushed a commit
to mrizwanashiq/docusaurus
that referenced
this pull request
Jun 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Breaking changes
@theme/hooks/*have been moved to@docusaurus/theme-commonnamed exports (sometimes renamed/refactored a bit but it's normally not public API surface)import useThemeContext from '@theme/hooks/useThemeContext'=>import {useColorMode} from '@docusaurus/theme-common';Motivation
We'd like to keep the
@themenamespace mostly for styled UI React components that you can swizzleAll the "UI agnostic" React and JS code is progressively moved to
@docusaurus/theme-commonAlso do various refactors/renamings and grouping related things together (context value hook, context, context consumer hook)
Have you read the Contributing Guidelines on pull requests?
(Write your answer here.)
Test Plan
refactor: same behavior as before and tests are passing