From e83ccddaf2804b790af55af677fd87d22d7cfa3b Mon Sep 17 00:00:00 2001 From: Tudor Morar Date: Thu, 11 Jul 2024 18:06:05 +0300 Subject: [PATCH] Rename useStore --- src/store/selectors/hooks/useSelector.ts | 4 ++-- src/store/store.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/store/selectors/hooks/useSelector.ts b/src/store/selectors/hooks/useSelector.ts index ef65f67..f97048a 100644 --- a/src/store/selectors/hooks/useSelector.ts +++ b/src/store/selectors/hooks/useSelector.ts @@ -1,9 +1,9 @@ -import { StoreType, useDAppStore } from '../../store'; +import { StoreType, useStore } from '../../store'; type ExtractState = S extends { getState: () => infer X } ? X : StoreType; export const useSelector = ( selector: (state: ExtractState) => T ) => { - return useDAppStore(selector); + return useStore(selector); }; diff --git a/src/store/store.ts b/src/store/store.ts index 2f48194..2ecc796 100644 --- a/src/store/store.ts +++ b/src/store/store.ts @@ -39,4 +39,4 @@ export const store = createStore( ) ); -export const useDAppStore = createBoundedUseStore(store); +export const useStore = createBoundedUseStore(store);