Refactor state management for active tabs and optimize component rendering
- Introduced `activeTabStore` to manage active tab state with fine-grained subscriptions. - Replaced direct prop passing of `isActive` with hooks (`useIsVaultActive`, `useIsSftpActive`) in components to determine active state. - Memoized components (e.g., `SftpView`, `VaultView`, `TerminalLayer`, `TopTabs`) to prevent unnecessary re-renders. - Updated various components to use `useCallback` and `useMemo` for stable references and performance improvements. - Removed redundant state and props, simplifying the component structure. - Disabled React.StrictMode in index.tsx for performance testing.
This commit is contained in:
Reference in New Issue
Block a user