Concept Flow - Mocking data fetching
Start Component Render
Call fetch function
Is mock enabled?
Yes→Return mock data
Return real data
Use data in component
Render UI with data
End
The component starts rendering, calls a fetch function that checks if mock data should be used. If yes, it returns mock data immediately; otherwise, it fetches real data. Then the component uses this data to render the UI.