Replies: 1 comment
-
I was able to find a workaround by removing my usage of the router. It seems to be working OK for Algolia for now. I'll post back if I find any issues with this approach:
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Adding middleware for multi-tenancy (like this repo demonstrates) seems to break Algolia's ability to sync search state to the querystring via a shallow router.push(). For me, it's making the page refresh every time.
Has anyone figured out a workaround for this issue?
The issue seems to be related to this bug, but it's already fixed so I'm not sure why this is happening:
vercel/next.js#32655
Here's a simple reproduction:
https://github.com/jmotes-lapero/nextjs-middleware-dynamic-shallow-routing
Demo URL:
https://nextjs-middleware-dynamic-shallow-routing.vercel.app/learn
Notice how changing the value of the
<select>
forces a page refresh? The"shallow": true
setting is supposed to prevent that (and does until middleware is added).I have a support ticket in with Vercel but thought I'd ask here incase someone knows the answer offhand...
Beta Was this translation helpful? Give feedback.
All reactions