Which project does this relate to?
Start
Describe the bug
I'm seeing the most boring server function imaginable fail to de-serialize when called from a client-side loader.
Repro below
Complete minimal reproducer
https://github.com/arackaf/my-blog/tree/special/bug-repro
Steps to Reproduce the Bug
Clone
npm i
npm run dev
browse here: http://localhost:3000/blog/swift-codable-any
then click the back arrow at the top
Page should error out. But then refresh the page on that root url - it should load
What's crazy is that the serverFn in that root url returns static data. I can't imagine what's making it fail to serialize
.handler(async () => {
return [
{
markdownContent: "",
title: "Swift - Encoding and decoding Any",
date: "2022-07-12T10:00:00.000Z",
description: "How to encode and decode json with concrete types, which include dynamic pieces typed as Any",
slug: "swift-codable-any",
},
];
Expected behavior
Should work :)
Screenshots or Videos
n/a
Platform
- Router / Start Version: [e.g. 1.121.0]
"@tanstack/react-router": "^1.170.4",
"@tanstack/react-start": "^1.168.6",
- OS: [e.g. macOS, Windows, Linux]
macOS
- Browser: [e.g. Chrome, Safari, Firefox]
Chrome
- Browser Version: [e.g. 91.1]
148
- Bundler: [e.g. vite]
Vite
- Bundler Version: [e.g. 7.0.0]
7.1.7
Additional context
No response
Which project does this relate to?
Start
Describe the bug
I'm seeing the most boring server function imaginable fail to de-serialize when called from a client-side loader.
Repro below
Complete minimal reproducer
https://github.com/arackaf/my-blog/tree/special/bug-repro
Steps to Reproduce the Bug
Clone
npm i
npm run dev
browse here: http://localhost:3000/blog/swift-codable-any
then click the back arrow at the top
Page should error out. But then refresh the page on that root url - it should load
What's crazy is that the serverFn in that root url returns static data. I can't imagine what's making it fail to serialize
.handler(async () => {
return [
{
markdownContent: "",
title: "Swift - Encoding and decoding
Any",date: "2022-07-12T10:00:00.000Z",
description: "How to encode and decode json with concrete types, which include dynamic pieces typed as
Any",slug: "swift-codable-any",
},
];
Expected behavior
Should work :)
Screenshots or Videos
n/a
Platform
"@tanstack/react-router": "^1.170.4",
"@tanstack/react-start": "^1.168.6",
macOS
Chrome
148
Vite
7.1.7
Additional context
No response