Created
February 20, 2026 15:23
-
-
Save shotgundebugging/4f4bc1b628d386ec4b71a14060e1db05 to your computer and use it in GitHub Desktop.
Route vs context state
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| • - Route state (location.state) is a one-time payload passed during navigation (navigate(..., { state }) or <Link state={...}>). | |
| - It does not auto-refresh. | |
| - It can be stale after backend changes. | |
| - It may be missing on direct URL loads/reloads. | |
| - Context state (UserAdminContext) is shared app state provided by UserLinks. | |
| - It is loaded/refreshed from API (fetchUser(userId)). | |
| - It updates over time and is the source of truth for current user data in that section. | |
| - It is consistent across nested admin user pages. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment