Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
50299af
Checkpoint
captbaritone Nov 18, 2025
aae051b
Get subscriptions working
captbaritone Nov 18, 2025
a7aa799
Get some transition stuff working
captbaritone Nov 19, 2025
b189e03
Try reusing useReducer code
captbaritone Nov 19, 2025
4360f29
Apply fixup when mounting during transition
captbaritone Nov 19, 2025
871d141
Commit store state on root commit
captbaritone Nov 20, 2025
fa1ffe4
Extend test logging
captbaritone Nov 20, 2025
9b80f05
Make logging more verbose
captbaritone Nov 20, 2025
b20181c
Avoid rendering in steady state if selected state is unchanged
captbaritone Nov 20, 2025
ce58f2a
Move ReactStore to react-reconciler package
captbaritone Nov 20, 2025
3ce0aa5
Refactor to store wrapper/tracker
captbaritone Nov 21, 2025
b6f0c7e
Small tweaks
captbaritone Nov 24, 2025
bbc914f
Fix flow errors
captbaritone Nov 24, 2025
444fb57
Add feature flag and rename API
captbaritone Nov 24, 2025
a0a7221
Add tests
captbaritone Nov 24, 2025
144e89b
Handle selector changes
captbaritone Nov 25, 2025
54bf746
Clarify (with types) that the store hook can read other external stores.
captbaritone Nov 25, 2025
fe978b3
Revert changes to dev files
captbaritone Nov 25, 2025
242c5c5
Make store wrapper its own event emitter
captbaritone Nov 25, 2025
afe2577
Confirm we unsubscribe from components
captbaritone Nov 25, 2025
f0c2e15
Test batched updates
captbaritone Nov 25, 2025
a9068ff
Simplify API by adding defaults
captbaritone Nov 25, 2025
95cff4d
Demonstrate two cases where we may need to eagerly track stores
captbaritone Dec 2, 2025
8b40db2
Add test for creating store in transition
captbaritone Dec 3, 2025
f515995
Add test for suspense
captbaritone Nov 26, 2025
e1c7053
Make default reducer work like setState and accept a state value dire…
captbaritone Jan 2, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions packages/react-debug-tools/src/ReactDebugHooks.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ import type {
Usable,
Thenable,
ReactDebugInfo,
ReactExternalDataSource,
} from 'shared/ReactTypes';
import type {
ContextDependency,
Expand Down Expand Up @@ -481,6 +482,13 @@ function useSyncExternalStore<T>(
return value;
}

function useStore<S, T>(
store: ReactExternalDataSource<S, mixed>,
selector?: (state: S) => T,
): T {
throw new Error('useStore is not yet supported in React Debug Tools.');
}

function useTransition(): [
boolean,
(callback: () => void, options?: StartTransitionOptions) => void,
Expand Down Expand Up @@ -777,6 +785,7 @@ const Dispatcher: DispatcherType = {
useDeferredValue,
useTransition,
useSyncExternalStore,
useStore,
useId,
useHostTransitionStatus,
useFormState,
Expand Down
Loading