usePermission does not update state when permission is granted on mobile
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- react, typescript
- Área
- frontend
Línea de trabajo
Start at the usePermission hook entry point and reproduce the camera-permission flow on iOS Chrome, comparing it with desktop behavior. Investigate how the hook observes permission changes and verify that granting camera access changes the reported state to granted on mobile.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What is the current behavior?
My code:
const state = usePermission({ name: "camera: })
console.log(state) // One of prompt, granted or denied
This works fine on desktop - when user grants permission, the state updates from prompt to granted. However, on google chrome mobile the state does not update.
Steps to reproduce it and if possible a minimal demo of the problem. Your bug will get fixed much faster if we can run your code and it doesn't have extra dependencies other than react-use. Paste the link to your JSFiddle or CodeSandbox example below:
Just try the usePermission hook with camera on google chrome mobile - you will see the bug/
What is the expected behavior?
The state should update to granted on mobile too
A little about versions:
- OS: iOS
- Browser (vendor and version): Google Chrome
- React: 18.3
react-use: 17.6- Did this worked in the previous package version? Didn't check
This could be due to limited support of Permission API in google chrome mobile - in which case would like to know a workaround
- Lenguaje dominante
- TypeScript
- Estrellas
- 44k
- Forks
- 3.3k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la 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 streamich/react-use
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
Add Generic Fn for useDebouncePosiblemente ocupada @itsmejay80 la tomó hace 189 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
-
useVideo.story.tsx - sampleVideo can not be loadedQuizá libre de nuevo Un pull request para esta issue se cerró sin fusionarse. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 62/100
-
useSlider: event callbacks are not updatedPosiblemente ocupada @erykpiast la tomó hace 1836 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Todos los issues de streamich/react-use
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
jbacalso24/mimry#459 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
architecture help wanted hive/claimed-by-architect origin/architect stage/030-pr-in-progress tech-debt
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
kubestellar/console#24422 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
area: backends type: docs
Dificultad 1/5 1-3 horas Aptitud para principiantes 83/100
schlessera/brain-kit#2383 ·
Los mantenedores suelen responder en 1 día
-
agent duplicate providers tool triaged
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Los mantenedores suelen responder en 1 día