T
TanStack13mo ago
environmental-rose

HMR not working properly

Hi, when i update my index.tsx to see changes in code i need to manually refresh the page:
tsx import { createFileRoute } from '@tanstack/react-router'
import { Component } from '~/components/test'
import data from '../../characters.json'

export const Route = createFileRoute('/')({
component: Home,
})

function Home() {
return (
<div className="p-8 space-y-2 pb-20">
{data.map((character) => (
<div className='max-w-3xl mx-auto'>
<img
src={character.image}
className="aspect-[4/5] h-44 object-cover"
alt={character.name}
/>
{character.name}
</div>
))}
<Component />
</div>
)
}
tsx import { createFileRoute } from '@tanstack/react-router'
import { Component } from '~/components/test'
import data from '../../characters.json'

export const Route = createFileRoute('/')({
component: Home,
})

function Home() {
return (
<div className="p-8 space-y-2 pb-20">
{data.map((character) => (
<div className='max-w-3xl mx-auto'>
<img
src={character.image}
className="aspect-[4/5] h-44 object-cover"
alt={character.name}
/>
{character.name}
</div>
))}
<Component />
</div>
)
}
this is minimal code, anyone else experiencing this issue?
1 Reply
stormy-gold
stormy-gold13mo ago
GitHub
[TanStack Start] HMR is not working from root route (__root) · Issu...
Describe the bug HMR is not working in root route. only working from normal routes. Your Example Website or App https://github.com/TanStack/router/tree/main/examples/react/start-basic-rsc Steps to ...

Did you find this page helpful?