@@ -2,16 +2,16 @@ import type { Selector } from '@reduxjs/toolkit'
22import { useDebugValue } from 'react'
33import { useExternalStore } from 'use-external-store'
44
5- import { readonlyStore , type RootState } from '..'
5+ import { readonlyStore as store , type RootState } from '..'
66import { useSyncExternalStoreWithSelector } from './useSyncExternalStoreWithSelector'
77
88export const useSyncSelector = < Selection > (
99 selector : Selector < RootState , Selection > ,
1010 isEqual ?: ( a : Selection , b : Selection ) => boolean ,
1111) : Selection => {
1212 const selection = useSyncExternalStoreWithSelector (
13- readonlyStore . subscribe ,
14- readonlyStore . getState ,
13+ store . subscribe ,
14+ store . getState ,
1515 selector ,
1616 isEqual ,
1717 )
@@ -23,7 +23,7 @@ export const useSelector = <Selection>(
2323 selector : Selector < RootState , Selection > ,
2424 isEqual ?: ( a : Selection , b : Selection ) => boolean ,
2525) : Selection => {
26- const selection = useExternalStore ( readonlyStore , selector , isEqual )
26+ const selection = useExternalStore ( store , selector , isEqual )
2727 useDebugValue ( selection )
2828 return selection
2929}
0 commit comments