question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

problem with Router.push using hash

See original GitHub issue

Bug report

Describe the bug

In my case when i change only hash url using Router.push(localhost:3000/#change) coming from localhost:3000 all stylesheets reload again causing the screen blink and a error in browser console.

To Reproduce

Steps to reproduce the behavior, please provide code snippets or a repository:

  1. Checkout https://github.com/fabinppk/hash-problem
  2. All instructions on readme file.

Screenshots

image

System information

  • OS: Ubuntu 20.04
  • Version of Next.js: 9.5.3-canary.6 or higher
  • Version of Node.js: v12.13.1

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:2
  • Comments:13 (8 by maintainers)

github_iconTop GitHub Comments

2reactions
Timercommented, Aug 27, 2020

Can y’all test the latest Next.js canary and see if the flash of styles is fixed for you?

1reaction
Mistereocommented, Aug 26, 2020

I can reproduce in Chrome but only with DevTools open and “Disable cache” (Network tab) option enabled.

Read more comments on GitHub >

github_iconTop Results From Across the Web

router.push() with hash does not work properly #18601
When using next/router's router.push() (and presumably other methods) with a hash parameter, the hash does not properly appear or the url ...
Read more >
How can vue-router push({name:"question"}) with hash?
Show activity on this post. For Router. push({ name: routeName, hash: '#toHash' }) to work, you need to configure your vue router. //...
Read more >
nextjs router push with hash
Activating extension 'vscode.typescript-language-features' failed: Could not find bundled tsserver.js.
Read more >
Programmatic Navigation
router.push . To navigate to a different URL, use router.push . This method pushes a new entry into the history stack, so when...
Read more >
Understanding Next.js routeChangeStart and router events
Meanwhile, the Link component uses the shallow props to specify if the routing is shallow or not. Both cases — router.push and Link ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found