Server and client implementations disagree with each other
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 22/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- nuxtjs, typescript
- Área
- full-stack
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 1k
- Forks
- 55
- Merge medio
- 2 d 10 h
- PR fusionados (30 d)
- 9
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de nuxt-modules/device
-
Cloudfront detection shouldn't rely on user-agentPosiblemente ocupada @luc122c la tomó hace 6 días. Abiertopending triage
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
nuxt-modules/device#141 · 1 comentario · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
Custom flag in Nuxt 3Abierto3.x enhancement
Dificultad 4/5 3-5 días Aptitud para principiantes 25/100
nuxt-modules/device#129 · 3 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dependency DashboardAbierto
Dificultad 4/5 3-5 días Aptitud para principiantes 10/100
nuxt-modules/device#95 ·
Los mantenedores suelen responder en 1 día
-
Huawei checkAbierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
nuxt-modules/device#89 ·
Los mantenedores suelen responder en 1 día
-
3.x enhancement
Dificultad 3/5 1-2 días Aptitud para principiantes 25/100
nuxt-modules/device#87 ·
Los mantenedores suelen responder en 1 día
Todos los issues de nuxt-modules/device
Issues similares
-
bnv-manager-v2: accept_invite creates the Mailcow domain admin before the commitPosiblemente ocupada @myOmikron la tomó hoy. Abiertobug ready-for-agent
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
-
Windows: mio 1.2.3 named-pipe use-after-free panics the native IPC broker and hangs every toolAbiertoplatform:windows tool triaged wontfix
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
nicolettas-muggelbude/RechnungsFee#448 ·
Los mantenedores suelen responder en 1 día
-
Android bug feature/error-tracking react-native team/error-tracking
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
PostHog/posthog-js#5310 · 1 comentario ·
Los mantenedores suelen responder en 1 día