OnLoad component renders a loading spinner displayed while the application fetches camera data on initial load.
Component Structure
components/onload.js
Props
This component does not accept any props.Layout
The component displays:- Full viewport height container (
vh-100) with centered content - Bootstrap spinner (
spinner-border) - Accessible hidden text: “Loading…” for screen readers
Usage in App
TheApp component conditionally renders OnLoad while waiting for Redux state to initialize:
app.js
data is null (initial render), OnLoad displays. Once the Redux store populates with camera data, the full application renders.
Styling
Uses Bootstrap’s built-in spinner component with:- Default spinner size
- Primary color from Bootstrap theme
- Centered positioning with flexbox
Related
- App Component - Root component conditional rendering
- State Management - Redux store initialization