0
Fork 0
mirror of https://github.com/TanStack/router.git synced 2026-11-18 19:34:24 +00:00
Commit graph

88 commits

Author SHA1 Message Date
Tanner Linsley
91ae17d7ea release: v1.119.0 2025-04-30 09:45:19 +00:00
Tanner Linsley
5bf73eaa85 release: v1.117.1 2025-04-24 21:11:24 +00:00
Manuel Schiller
afdafcf63a
fix: pending component handling for initial load (#4044) 2025-04-24 23:09:47 +02:00
Tanner Linsley
3cbb3e8492 release: v1.117.0 2025-04-23 01:48:48 +00:00
Tanner Linsley
d843f83057 release: v1.116.0 2025-04-13 19:59:11 +00:00
Zac Rosenbauer
f0138f80b0
feat(react-router): Export ClientOnly (#3969)
Exposes the `ClientOnly` component for preventing rendering & hydration
errors.

## Background

When you attempt to prevent content from rendering using something like
`typeof document !== 'undefined'` as that type of conditional will cause
hydration errors.

## API

```tsx
import { ClientOnly, createRoute } from '@tanstack/react-router'
import { Charts, FallbackCharts } from './charts-that-break-server-side-rendering'

const Route = createRoute({
  // ... other route options
  path: '/dashboard',
  component: Dashboard,
})

function Dashboard() {
  return (
    <div>
      <p>Dashboard</p>
      <ClientOnly fallback={<FallbackCharts />}>
        <Charts />
      </ClientOnly>
    </div>
  )
}
```

> [!NOTE]
> This component as is (other than I removed the `children` as a
`function`) in production on [joggr.io](https://joggr.io)

---------

Co-authored-by: Sean Cassiere <33615041+SeanCassiere@users.noreply.github.com>
Co-authored-by: Ahmed Abdelbaset <A7med3bdulBaset@gmail.com>
Co-authored-by: Birk Skyum <birk.skyum@pm.me>
2025-04-13 10:50:44 +02:00
Tanner Linsley
af455d812f release: v1.115.3 2025-04-11 17:19:44 +00:00
Tanner Linsley
361d32b2d5 release: v1.115.0 2025-04-06 04:50:31 +00:00
Tanner Linsley
f8015e7629 release: v1.114.33 2025-04-02 18:43:59 +00:00
Alex
9b95618f5b
fix(react-router): restore scroll position onResolved (#3914)
Fixes #3741 

Added hash scroll handling directly in the React `Transitioner`
component's `onResolved`, similar to how it's implemented in the Solid
version
2025-04-02 20:37:36 +02:00
Tanner Linsley
9ca08f4756 release: v1.114.32 2025-04-01 14:24:37 +00:00
Christopher Horobin
fb99d92ca8
fix(router-core): remove React type dependency (#3902) 2025-04-01 16:23:06 +02:00
Tanner Linsley
c67c0e1f3a release: v1.114.29 2025-03-27 00:35:38 +00:00
Tanner Linsley
7dfee394c2 release: v1.114.26 2025-03-20 14:15:32 +00:00
Brenley Dueck
cf0f2a7ca9
fix(solid-router): nav flickering and view transitions (#3813)
I think this should fix the nav flicker some people have brought up.
This also seems to fix the view transitions issue

Basically a tweak of this pr
https://github.com/TanStack/router/pull/3589/files
2025-03-20 15:08:23 +01:00
Tanner Linsley
7c229b3539 release: v1.114.25 2025-03-18 18:27:26 +00:00
Birk Skyum
27b02830b0
refactor(router-core): moving internals of Router to router core (#3800) 2025-03-18 19:26:13 +01:00
Tanner Linsley
4190c07628 release: v1.114.24 2025-03-18 12:06:26 +00:00
Birk Skyum
647949522a
refactor(router-core): move internals of Route to router-core (#3803)
Similar to #3800 , this use base classes to contain shared methods of
the solid/react-router Route in the router-core package.
2025-03-18 13:04:59 +01:00
Tanner Linsley
4d675074b0 release: v1.114.23 2025-03-16 23:20:07 +00:00
Tanner Linsley
f02a7bcecf release: v1.114.22 2025-03-15 22:54:39 +00:00
Tanner Linsley
11a4d9d96f release: v1.114.17 2025-03-12 12:55:31 +00:00
Birk Skyum
dfdb9f467d
fix(router-core): move ThrowConstraint to core utils (#3749) 2025-03-12 13:54:05 +01:00
Tanner Linsley
bf5bd47225 release: v1.114.16 2025-03-12 12:32:10 +00:00
Birk Skyum
215d6f5202
fix(router-core): move typePrimitives to shared package (#3748)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-03-12 13:30:19 +01:00
Tanner Linsley
b90b3f2c83 release: v1.114.15 2025-03-11 17:48:06 +00:00
Birk Skyum
032dc2f49e
fix(router-core): agnostic scroll restoration (#3740)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-03-11 18:46:51 +01:00
Tanner Linsley
5a7c98b656 release: v1.114.14 2025-03-11 15:41:23 +00:00
Tanner Linsley
7553dcb5d2 fix: Allow window as element scroll restoration element 2025-03-11 09:35:14 -06:00
Tanner Linsley
2483a9741d release: v1.114.12 2025-03-10 12:05:39 +00:00
Tanner Linsley
26ffdb586b release: v1.114.7 2025-03-10 09:15:55 +00:00
Birk Skyum
bea9e4d58d
refactor(router-core): move isNotFound and isRedirect to router-core (#3725)
this will unlock agnostic server-functions packages

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
2025-03-10 10:10:02 +01:00
Tanner Linsley
700b5aa28c release: v1.114.6 2025-03-10 07:41:45 +00:00
Tanner Linsley
9f953e9785 release: v1.114.3 2025-03-09 08:37:06 +00:00
Sean Cassiere
afb716a44f
revert(react-router,solid-router): revert #3700 (#3702)
#3700 introduced an unintended side-effect with the scroll restoration
process in TanStack Start.

This revets the code changes in `@tanstack/react-router` and
`@tanstack/solid-router` and short-circuits the tests relevant test
scripts introduced in the offending PR.
2025-03-09 20:39:43 +13:00
Tanner Linsley
9ea1c83aad release: v1.114.2 2025-03-09 03:03:46 +00:00
Sean Cassiere
ad623cc992
fix(react-router,solid-router): scroll to element does not work for hash history (#3700)
The `restoreScroll` function was directly interfacing with
`window.location.hash` to get the 'hash' value, which conflicts with how
hash routing functions. As such, when the hash value was retrieved, it
came back as `#/page#foo` instead of just `#foo` like it would with
regular browser history.

Switching it to use the `history` driver attached to the `router`
instance, correctly returns the `hash` value irrespective of the type of
routing being used.

Fixes #3479
2025-03-09 16:00:21 +13:00
Tanner Linsley
672116725b release: v1.114.1 2025-03-08 20:05:26 +00:00
Tanner Linsley
06237feeb1 release: v1.112.18 2025-03-06 23:02:15 +00:00
Manuel Schiller
c9a32784ce
fix: use fullPath as from in Route/RouteApi useNavigate (#3684)
fixes #3679
2025-03-06 23:58:51 +01:00
Manuel Schiller
30e869042d
chore: add script to bump typescript version and bump it to 5.8 (#3618)
Co-authored-by: chorobin <chrishorobin@hotmail.com>
2025-03-06 21:06:32 +01:00
Tanner Linsley
70351e525e release: v1.112.17 2025-03-06 00:37:45 +00:00
Manuel Schiller
f4d09c19c4
fix: rebuild link if matches change (#3674)
fixes #2988
2025-03-06 01:36:16 +01:00
Tanner Linsley
76b0c2e9f3 release: v1.112.16 2025-03-05 23:52:06 +00:00
Manuel Schiller
bf0fc0044d
fix: use leaf match as from if none supplied for <Link> (#3673) 2025-03-06 00:50:51 +01:00
Tanner Linsley
cbc27fa900 release: v1.112.15 2025-03-05 21:16:53 +00:00
Manuel Schiller
a638d77ac8
fix: use default from in useNavigate (#3671)
fixes #3668
2025-03-05 22:15:21 +01:00
Birk Skyum
c699da2bc3
Fix CI - Revert "refactor(react-router,solid-router): move redirect to router-core" (#3667)
Reverts TanStack/router#3662
2025-03-05 16:33:26 +01:00
Birk Skyum
3a2d51e11d
refactor(router-core): move redirect to core (#3662) 2025-03-05 11:37:52 +01:00
Tanner Linsley
e6607f367e release: v1.112.12 2025-03-04 20:50:19 +00:00