Menu

Post image 1
Post image 2
1 / 2
0

React and User Preferences: Respect the OS Settings Your Users Already Picked

DEV Community·reactuse.com·19 days ago
#9cquwjXJ
Reading 0:00
15s threshold

React and User Preferences: Respect the OS Settings Your Users Already Picked Every modern operating system asks the user, at some point, what kind of UI they want. Dark mode or light. High contrast or normal. Animations on or stripped down. Left-to-right or right-to-left. Preferred language. The user picks once, in System Settings, and from that moment on every well-built native app on the machine respects the choice. The web app you ship usually does not — it picks its own dark mode toggle, its own animation library, its own assumed-English copy, and the OS preference becomes a five-line note in someone's bug tracker. The fix is small and the API surface is narrow. The browser exposes the OS preferences through window.matchMedia and navigator.language , and every modern React app can wire them up in an afternoon. The problem is not capability; it is that the wiring lives in the same useEffect / useState /SSR-mismatch swamp that every web feature lives in, and so it gets postponed forever.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.

Read More