Common Navigation and Styling Mistakes in React UIs
Navigation and styling have predictable mistakes. Here are the common ones and how to avoid them.
Common Navigation and Styling Mistakes in React UIs
Navigation and styling have predictable mistakes. Here are the common ones in React UIs and how to avoid them.
Anchor Tags Instead of Link
Using anchor tags for internal navigation causes full page reloads and loses app state. Use Link for client-side navigation.
Missing a Catch-All 404
Without a catch-all route, invalid URLs show a blank page. Add a 404 route for graceful handling.
Inconsistent Styling
Using different colors, spacing, and typography across pages. Use a design token system so the UI is consistent.
Forgetting Loading States
Buttons and forms that take time should show loading. A button that does nothing during a slow request feels broken to users.
Not Making It Responsive
Building for desktop only and ignoring mobile. Plan responsive behavior from the start so the UI works on all sizes.
Inline Styles Everywhere
Using the style attribute everywhere scatters styling and makes it hard to maintain. Use a styling approach like Tailwind or CSS Modules instead.
No Focus Management for Modals
Modals that do not trap focus or return focus on close are inaccessible. Always handle focus for keyboard and screen reader users.
The Takeaway
Common navigation and styling mistakes include anchor tags instead of Link, missing 404, inconsistent styling, missing loading states, no responsiveness, inline styles, and no focus management for modals. Fix these and the UI is solid.
Because anchor tags cause full page reloads and lose app state. Link updates the URL without a reload, which is what makes client-side routing work and preserves the single-page experience.
Without it, invalid URLs show a blank page. A catch-all 404 route handles invalid URLs gracefully, showing a not-found message instead of nothing, which is much better UX.
Use a design token system. Define your colors, spacing, and typography as tokens, with Tailwind customization or CSS variables, so they stay consistent across the app instead of ad hoc values scattered across components.
Because a button that does nothing during a slow request feels broken to users. Show a spinner and disable the button during the request, so users know something is happening and cannot double-click.
Because modals that do not trap focus or return focus on close are inaccessible to keyboard and screen reader users. Always handle focus: trap it within the modal while open, and return it to the trigger on close.
Ready to master Node.js completely?
Want to upskill yourself, crack your next interview, and get your dream job? Join our comprehensive course to dive deeper with high-quality video tutorials, solve interview questions, and a premium community.
Master Node.js
Want to upskill yourself, crack your next interview, and get your dream job? Join our comprehensive course.

