Code Monkey home page Code Monkey logo

Comments (5)

ztanner avatar ztanner commented on May 24, 2024 1

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.

PupoSDC avatar PupoSDC commented on May 24, 2024

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.

darthmaim avatar darthmaim commented on May 24, 2024

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.

PupoSDC avatar PupoSDC commented on May 24, 2024

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.

ztanner avatar ztanner commented on May 24, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.