GithubHelp home page GithubHelp logo

Comments (4)

nandorojo avatar nandorojo commented on June 2, 2024

i believe this is known behavior from useRouter() from Next.js, presumably to have the same props on the client/server and avoid hydration issues of static rendering. at least that’s my best guess

from solito.

nandorojo avatar nandorojo commented on June 2, 2024

i think it has the right parameter on first render for dynamic parameters, right? /artists/[slug] should have slug on the first render i assume

from solito.

nandorojo avatar nandorojo commented on June 2, 2024

keep in mind that this is why useParam offers parse and initial options (on the web side only)

also, it returns an optional type, so you should always be null checking your query param variables, since they are never guaranteed to exist.

from solito.

nandorojo avatar nandorojo commented on June 2, 2024

To get around this, you probably need to use Next.js' getServerSideProps to enable dynamic SSR. Otherwise, this is working the same way that Next.js' router would.

from solito.

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.