Server and client implementations disagree with each other
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 22/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- nuxtjs, typescript
- Ambito
- full-stack
Direzione di ricerca
The mismatch comes from generateFlags running on the server with CloudFlare headers (cf-device-type overriding isMobile) and on the client with only navigator.userAgent. Start by tracing where both paths compute flags and how the server result reaches the client. Done means the server-rendered and client-hydrated flags match for the same request, and the issue doesn't say which approach the maintainers want.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
This module computes its properties both on the server and on the client independently.
Unfortunately they tend to disagree with each other when it comes to CloudFlare headers (they always win over user agents), which results in a lot of hydration errors (for us).
cf-device-type forces isMobile to false on the server side if its value is desktop or tablet.
The client, on the other hand, calls generateFlags(navigator.userAgent) with no headers and the module doesn't seem to copy over the server-side values to the client-side (e.g. using useState), which can result in differences (and does).
It would be great if server and client would share the same detection results.
- Lingua principale
- TypeScript
- Stelle
- 1k
- Fork
- 55
- Merge medio
- 2g 10h
- PR unite (30g)
- 9
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di nuxt-modules/device
-
Cloudfront detection shouldn't rely on user-agentForse già presa @luc122c l’ha presa 7 giorni fa. Apertapending triage
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
nuxt-modules/device#141 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
Custom flag in Nuxt 3Aperta3.x enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 25/100
nuxt-modules/device#129 · 3 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Dependency DashboardAperta
Difficoltà 4/5 3-5 giorni Idoneità per principianti 10/100
nuxt-modules/device#95 ·
I maintainer di solito rispondono entro 1 giorno
-
Huawei checkAperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
nuxt-modules/device#89 ·
I maintainer di solito rispondono entro 1 giorno
-
3.x enhancement
Difficoltà 3/5 1-2 giorni Idoneità per principianti 25/100
nuxt-modules/device#87 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di nuxt-modules/device
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 77/100
TomerAberbach/profiler-md#733 ·
I maintainer di solito rispondono entro 1 giorno
-
bug priority: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
brentspine/brents-toasts#143 ·
-
🐛 bug 🗺️ DB Models & Ops
Difficoltà 2/5 1-3 ore Idoneità per principianti 83/100
LibreChat-AI/LibreChat#17214 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 67/100
Wavvon/Wavvon-clients#136 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 62/100
umami-software/umami#4637 ·
I maintainer di solito rispondono entro 3 giorni