()
| 486 | }) |
| 487 | |
| 488 | function Header() { |
| 489 | const router = useRouter() |
| 490 | const ctx = appRoute.useRouteContext() |
| 491 | |
| 492 | return ( |
| 493 | <div> |
| 494 | Header Counter: <p data-testid="header-counter">{ctx().counter}</p> |
| 495 | <button |
| 496 | onClick={() => { |
| 497 | router.invalidate() |
| 498 | }} |
| 499 | data-testid="invalidate-router" |
| 500 | style={{ |
| 501 | border: '1px solid blue', |
| 502 | }} |
| 503 | > |
| 504 | Invalidate router |
| 505 | </button> |
| 506 | </div> |
| 507 | ) |
| 508 | } |
| 509 | |
| 510 | const indexRoute = createRoute({ |
| 511 | getParentRoute: () => appRoute, |
nothing calls this directly
no test coverage detected