Skip to content

Perf/react query optimization and error handling - #8

Merged
kalayciburak merged 2 commits into
masterfrom
perf/react-query-optimization-and-error-handling
Nov 2, 2025
Merged

Perf/react query optimization and error handling#8
kalayciburak merged 2 commits into
masterfrom
perf/react-query-optimization-and-error-handling

Conversation

@kalayciburak

Copy link
Copy Markdown
Owner

No description provided.

Migrate resource fetching from Zustand to React Query for better
caching and automatic data synchronization. Add error boundary for
improved crash handling and bundle size optimizations.

Changes:
- Migrate resource fetching to React Query with automatic polling
- Add useResources hook with 5s refetch interval
- Optimize bundle size with lazy-loaded DevTools
- Add ErrorBoundary component for crash recovery
- Update useDashboardState to use React Query hooks

Benefits:
- Automatic background data synchronization
- Better caching and reduced API calls
- Smaller production bundle (DevTools excluded)
- Graceful error handling with user-friendly UI
- Reduced polling complexity
Reverted resource fetching back to Zustand store with existing
smart polling mechanism. Removed useResources hook with continuous
5-second polling that created unnecessary API traffic.

Changes:
- Remove useResources hook entirely
- Revert useDashboardState to use Zustand store
- Keep existing smart polling (only during start/stop/delete)
- Polling only active when operations are in progress
- Manual refresh on button click

Benefits:
- No continuous API polling
- Only poll during active operations
- Reduced API traffic significantly
- Existing smart polling logic preserved
@kalayciburak
kalayciburak merged commit 0a5803f into master Nov 2, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant