How tesovicp/react-chakra-dog-cat works
This React app lets users navigate among a home page, cat images, and two dog-image views. The cats and standard dogs pages use Redux-backed hooks and API requests; the alternate dogs page is wrapped in a separate React context provider. The README identifies Chakra UI and the two image APIs as product technologies. Edges reflect shown routing and module references; details of the unsampled dog reducer/API flow are limited to indexed references.
Main entry points: App.tsx App routes · DogsC.tsx Context dogs gallery · main.reducer.ts Redux root state · Navigation.tsx Navigation and theme
Components 20
Application shell
- App bootstrap
src/index.tsx - App routes
src/App.tsx - Home page
src/pages/Home/Home.tsx - Navigation and theme
src/pages/Navigation/Navigation.tsx
Image galleries
- Cats gallery
src/pages/Cats/Cats.tsx - Dogs gallery
src/pages/Dogs/Dogs.tsx - Context dogs gallery
src/pages/DogsContext/DogsC.tsx
State and data
- Cats list hook
src/pages/Cats/hooks/useCatsList.ts - Dogs list hook
src/pages/Dogs/hooks/useDogsList.ts - Cats API client
src/pages/Cats/api/getCatsApi.ts - Dogs API client
src/pages/Dogs/api/getDogsApi.ts - Context dogs API
src/pages/DogsContext/api/getDogsContextApi.ts - Cats reducer
src/pages/Cats/catsSlice.ts - Dogs reducer
src/pages/Dogs/dogsSlice.ts - Redux root state
src/common/main.reducer.ts - Dogs context provider
src/pages/DogsContext/dogsContext.tsx - Context reducer
src/pages/DogsContext/dogsReducer.ts
Other components
- Visitor
- The Cat API
- Dog CEO API
Connections 25
- Visitor → App bootstrap: opens app
src/index.tsx - App bootstrap → App routes: renders
src/index.tsx - App routes → Home page: routes to
src/App.tsx - App routes → Cats gallery: routes to
src/App.tsx - App routes → Dogs gallery: routes to
src/App.tsx - App routes → Context dogs gallery: routes to
src/App.tsx - App routes → Dogs context provider: wraps with
src/App.tsx - Home page → Navigation and theme: renders
src/pages/Home/Home.tsx - Cats gallery → Navigation and theme: renders
src/pages/Cats/Cats.tsx - Dogs gallery → Navigation and theme: renders
src/pages/Dogs/Dogs.tsx - Context dogs gallery → Navigation and theme: uses
src/pages/DogsContext/DogsC.tsx - Cats gallery → Cats list hook: uses
src/pages/Cats/Cats.tsx - Dogs gallery → Dogs list hook: uses
src/pages/Dogs/Dogs.tsx - Context dogs gallery → Dogs context provider: uses
src/pages/DogsContext/DogsC.tsx - Cats list hook → Cats API client: calls
src/pages/Cats/hooks/useCatsList.ts - Dogs list hook → Dogs API client: calls
src/pages/Dogs/hooks/useDogsList.ts - Context dogs gallery → Context dogs API: uses
src/pages/DogsContext/DogsC.tsx - Cats API client → The Cat API: requests images
src/pages/Cats/api/getCatsApi.ts - Dogs API client → Dog CEO API: requests images
src/pages/Dogs/api/getDogsApi.ts - Context dogs API → Dog CEO API: requests images
src/pages/DogsContext/api/getDogsContextApi.ts - Redux root state → Cats reducer: combines reducer
src/common/main.reducer.ts - Redux root state → Dogs reducer: combines reducer
src/common/main.reducer.ts - Cats list hook → Redux root state: selects state
src/pages/Cats/hooks/useCatsList.ts - Dogs list hook → Redux root state: selects state
src/pages/Dogs/hooks/useDogsList.ts - Dogs context provider → Context reducer: runs reducer
src/pages/DogsContext/dogsContext.tsx