Skip to content

Complex Data Fetching and Transformation in ExplorePage.jsx #62

@Aditya8369

Description

@Aditya8369

Description:

The fetchMentors useEffect hook in Frontend/src/pages/ExplorePage.jsx (approximately 80 lines) handles API requests, data transformation, skill aggregation, merging with mock data, and error handling all in one place. This leads to a monolithic block that's difficult to test, debug, and reuse, violating separation of concerns.

Proposed Solution:

Refactor into a custom hook useMentorsData that encapsulates fetching, transforming, and merging logic. Use utility functions for data transformation and skill collection to improve modularity.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions