A settings panel lets users toggle between light and dark theme. Their preference should be applied and persist when they click the toggle. The theme is always shown as dark regardless of what the user selects.
The page loads showing "Theme: dark" even though the user's saved preference is light. Clicking Toggle has no visible effect — the theme always reads "dark"
When you spread two objects together, the second one wins for any keys they share. Think about which object should take priority — user preferences or defaults
When you spread two objects together, the second one wins for any keys they share. Think about which object should take priority — user preferences or defaults