useSessionStorage is tied up to a component state and not to SS
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 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 with the linked CodeSandbox reproduction and the useSessionStorage hook entry point, then inspect how updates from ComponentA and ComponentB are persisted under the shared myKey. Done means updating one property preserves the other property's stored array, matching the expected session-storage shape described in the issue.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What is the current behavior?
I have an object with the following signature:
type Value = {
a: string[],
b: string[]
}
And the two components ComponenA and ComponentB and SS key myKey. Whenever user clicks on ComponentA value.a should be updated in SS and value.b should not be overridden. Actually useSessionStorage overrides the SS value depending on which component was clicked last. For example user cliked several times on both components, the SS value is:
{
b: ["Value B", "Value B", "Value B", "Value B"],
};
What is the expected behavior?
The SS should be updated for the myKey. Say user clicked several times on both components then SS value should look something like:
{
a: ["Value A", "Value A", "Value A", "Value A"],
b: ["Value B", "Value B"],
};
A little about versions:
- OS: Windows
- Browser (vendor and version): Chrome
- React: 18+
react-use: 17.5.1
- 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 185 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 1832 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 62/100
one-zero-eight/apply-bot#39 ·
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
bigbluebutton/bbb-ui-components-react#108 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
high priority
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
CI-CMG/deep-sea-corals-exb#84 · 1 comentario ·