Skip to content

Api queries#5

Open
Shushanik01 wants to merge 5 commits into
app-state-managmentfrom
api-queries
Open

Api queries#5
Shushanik01 wants to merge 5 commits into
app-state-managmentfrom
api-queries

Conversation

@Shushanik01

Copy link
Copy Markdown
Owner
  1. https://github.com/rolling-scopes-school/tasks/blob/master/react/modules/tasks/queries.md
image 3. Deployment link: https://shushanik01.github.io/react-class-components_RSschool/ 4. Done 01/06/2026 - Deadline 02/06/2026 5. Score 100/100 # RTK Query Requirements Checklist

Feature 1: API Integration (25/25)

Query Library Setup

✅ RTK Query is integrated and configured in the application.

✅ API services are implemented using createApi.

✅ RTK Query middleware is registered in the Redux store.

✅ All API requests are performed through RTK Query endpoints.

✅ No direct API calls (fetch, axios, etc.) are used outside RTK Query.

✅ Proper cache invalidation strategies are implemented using providesTags and invalidatesTags.

✅ Cache TTL (time-to-live) is configurable via an environment variable.

✅ RTK Query cache lifetime settings use the environment variable configuration.

Result: Fully implemented and compliant with requirements.


Feature 2: Data Caching and Loading States (25/25)

Data Caching and Loading

✅ Loading indicators are displayed while data is being fetched.

✅ Components correctly handle loading and fetching states.

✅ Previously fetched data is cached by RTK Query.

✅ Cached data is reused during navigation whenever possible.

✅ Duplicate requests are automatically avoided through RTK Query caching.

✅ List and detail pages reuse cached data for improved performance and user experience.

Result: Fully implemented and compliant with requirements.


Feature 3: Error Handling (20/20)

Error State Display

✅ API request failures are handled correctly.

✅ Clear and user-friendly error messages are displayed.

✅ Error UI is rendered when requests fail.

✅ RTK Query error states are used to manage failures.

✅ The application remains stable and usable after errors occur.

Result: Fully implemented and compliant with requirements.


Feature 4: Manual Cache Invalidation (10/10)

Manual Refresh

✅ A custom Refresh button is implemented.

✅ Clicking the Refresh button explicitly invalidates the relevant cache entries.

✅ RTK Query tag invalidation is used for cache management.

✅ Cache invalidation automatically triggers a new API request.

✅ Users can manually refresh data and retrieve the latest information from the server.

Result: Fully implemented and compliant with requirements.


Feature 5: Test Coverage for Querying (20/20)

Query Feature Tests

✅ Loading states are covered by automated tests.

✅ Error states are covered by automated tests.

✅ Query caching behavior is covered by automated tests.

✅ Cache reuse behavior is verified through tests.

✅ Query-related functionality is protected against regressions.

Result: Fully implemented and compliant with requirements.


Final Assessment

All functional requirements have been implemented successfully.

Total Score: 100 / 100

  • API Integration: 25 / 25
  • Data Caching and Loading States: 25 / 25
  • Error Handling: 20 / 20
  • Manual Cache Invalidation: 10 / 10
  • Test Coverage for Querying: 20 / 20

Overall Status: Requirements Fully Satisfied ✅

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