Comments (5)
Hi, did you mean to share a different CodeSandbox? The one you shared is working fine for me.
CleanShot.2024-05-08.at.06.45.37.mp4
from next.js.
I acidentaly fixed the sandbox with someone elses advice. The issue seems to be specific for default.tsx
.
I've reverted the changes so the sandbox is working again.
from next.js.
I acidentaly fixed the sandbox with someone elses advice
How did you accidentally fix it? #50284 is full of ugly workarounds, so maybe your workaround works better than those until this is fixed...
from next.js.
Replacing the default.tsx
with a page.tsx
. It's not a 1 to 1 replacement, as it does not achieve the same functionality. But it fixed the issue on my specific use case.
from next.js.
Glad you got it working! It sounds like the behavior you were running into is expected behavior for default.tsx
, described in a bit more detail here: https://nextjs.org/docs/app/api-reference/file-conventions/default
default.tsx
is only used when the slot is first unmatched (ie, on page load). On soft navigations, whatever was in the slot will remain active, if it doesn't match to a page.tsx
.
from next.js.
Related Issues (20)
- next JS 13.0.6 HOT 1
- Component Reinitialization Issue with `loading.tsx` and `revalidateTag` HOT 1
- CSS module of client component is injected to DOM before global css in layout regardless of import order
- Docs: Pages and layouts section not opening (again) HOT 1
- MSW Turbopack fails to import HOT 2
- ReferenceError: window is not defined... in client component? HOT 6
- Next 14 is not working properly in docker on windows with bun, but normal at local terminal HOT 4
- Sourcemaps are not loaded in index pages with a dynamic route level deeper than one
- SVG with icons not updating after change HOT 6
- [backport request] Backport fix of an already-fixed bug of next-swc HOT 5
- FileList is not defined on client component HOT 1
- Memory Leak with Image Optimization in Next.js Docker Environment
- When tried to deploy latest canary to vercel -- Error: Invariant: prefetchDataRoute can't be set without PPR HOT 3
- Revalidate does not work on Vercel Deployment only HOT 1
- Buffer polyfill not work on ios lower then 14 HOT 1
- Buffer polyfill not work on ios lower then 14 HOT 5
- Custom page extension + own sitemap/robots route bug - route source code returned instead of Response HOT 2
- Router cache does not revalidate HOT 3
- Importing svg's using svgr/webpack no longer works in the latest canary release when using ppr (error: Cannot read properties of undefined (reading 'stack'))
- Unexpected token Ident("tr") HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from next.js.