Preact routing doesn't work well with Gatsby
See original GitHub issueDescription
When I click on link (Gatsby Link component), URL in searchbar is changing, but page doesn’t change
Steps to reproduce
- Install Preact (using official plugin instruction)
- Use a Link component on the page
- Run build command
- Click on the link
Expected result
URL changes and new page appears.
Actual result
Page remains, but you’ll get a new URL.
Environment
System:
OS: Windows 10
CPU: (4) x64 Intel(R) Core(TM) i5-7200U CPU @ 2.50GHz
Binaries:
npm: 6.9.0 - C:\Program Files\nodejs\npm.CMD
Languages:
Python: 2.7.16
Browsers:
Edge: 44.18362.329.0
npmPackages:
gatsby: ^2.9.4 => 2.13.50
gatsby-image: ^2.1.4 => 2.2.8
gatsby-plugin-feed: ^2.2.3 => 2.3.6
gatsby-plugin-manifest: ^2.1.1 => 2.2.4
gatsby-plugin-offline: ^2.1.3 => 2.2.4
gatsby-plugin-react-helmet: ^3.0.12 => 3.1.2
gatsby-plugin-sass: ^2.1.0 => 2.1.4
gatsby-plugin-sharp: ^2.1.5 => 2.2.9
gatsby-plugin-sitemap: ^2.1.0 => 2.2.5
gatsby-plugin-twitter: ^2.1.2 => 2.1.2
gatsby-remark-images: ^3.0.16 => 3.1.7
gatsby-remark-prismjs: ^3.3.1 => 3.3.4
gatsby-remark-relative-images: ^0.2.3 => 0.2.3
gatsby-remark-responsive-iframe: ^2.2.8 => 2.2.8
gatsby-source-filesystem: ^2.0.39 => 2.1.8
gatsby-transformer-remark: ^2.5.0 => 2.6.10
gatsby-transformer-sharp: ^2.1.21 => 2.2.5
Issue Analytics
- State:
- Created 4 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Using Web Components with Gatsby and Preact - Ryosuke
As I've been working with Web Components, I've been trying to find a compatible workflow that is easy to use and efficient.
Read more >Routing not working using Gatsby - reach-router
I'm trying to render a blog as a card then open it up as a page , but its proving ...
Read more >Gatsby Changelog | 5.3.0
In PR #36623 we fixed this behavior and any node changes (either by changing local files or through webhook updates) will be reflected...
Read more >Gatsby: The ultimate guide with examples - LogRocket Blog
This tutorial covers everything you'll ever need to know about Gatsby, including code demos and comparisons to React and Next.js.
Read more >Overview - Reach Router
Reach Router is a small, simple router for React that borrows from React Router, ... have some sort of global chrome/navigation, that works...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@wardpeet HEHEHEHEHEHEHE THAT WORKS!!! daaaamn life saver 😃 thanks a lot ❤️
@persocon are you sure you’ve updated to latest gatsby & plugin-preact? I know we had an issue with the jsx-runtime check that react and babel had introduced
https://reactjs.org/blog/2020/09/22/introducing-the-new-jsx-transform.html