Load the ride map on demand
Load the ride-map module only when requested, reuse a successful module, and expose recoverable loading failures.Description
Requirements
Export LazyRideMap from src/App.tsx.
Do not invoke loadMap until active becomes true.
Keep one loadMap promise for repeated active renders and reuse the fulfilled module.
Show a named loading state while the module promise is pending.
Expose Retry after rejection and start one fresh load without discarding rideId.
Expose visible status and interactive controls with native semantics, accessible names, and keyboard operation appropriate to the workflow.
Do not mutate props, nested caller-owned values, or arrays supplied to the component.
Closed panel
active remains false
loadMap is never called
Do not invoke loadMap until active becomes true.
Retry
The first dynamic load rejects and the second resolves
The map renders once with the current rideId
Keep one loadMap promise for repeated active renders and reuse the fulfilled module.
Constraints
Use React state and effects only where the observable component contract requires themUse injected adapters instead of accessing network, storage, timers, or browser globals directlyKeep one authoritative state transition for each user or adapter event
Hints
Hint 1
Start with the loads-on-demand behavior and make its observable result deterministic.
Hint 2
Model deduplicates-loader independently before combining it with the remaining states.
Hint 3
Verify the boundary described by retries-load without changing caller-owned input.