various performance refactors

This commit is contained in:
jeffvli
2026-04-01 21:27:28 -07:00
parent c60610cb42
commit 51425b5e86
14 changed files with 313 additions and 148 deletions
@@ -1,6 +1,7 @@
import merge from 'lodash/merge';
import { devtools, persist } from 'zustand/middleware';
import { immer } from 'zustand/middleware/immer';
import { shallow } from 'zustand/shallow';
import { createWithEqualityFn } from 'zustand/traditional';
export interface FullScreenPlayerSlice extends FullScreenPlayerState {
@@ -62,3 +63,12 @@ export const useFullScreenPlayerStoreActions = () =>
export const useSetFullScreenPlayerStore = () =>
useFullScreenPlayerStore((state) => state.actions.setStore);
export const useFullScreenPlayerOverlayState = () =>
useFullScreenPlayerStore(
(state) => ({
expanded: state.expanded,
visualizerExpanded: state.visualizerExpanded,
}),
shallow,
);