feat(react): infer node types from passed nodes

This commit is contained in:
moklick
2024-01-24 18:25:31 +01:00
parent 8983d64397
commit a345b2670b
15 changed files with 364 additions and 354 deletions
+2 -2
View File
@@ -31,7 +31,7 @@ function useStore<StateSlice = ExtractState>(
return useZustandStore(store, selector, equalityFn);
}
const useStoreApi = () => {
function useStoreApi() {
const store = useContext(StoreContext);
if (store === null) {
@@ -47,6 +47,6 @@ const useStoreApi = () => {
}),
[store]
);
};
}
export { useStore, useStoreApi };