callstack / callstack/react-native-pager-view
Page cannot be navigated to after being dynamically added
- Lenguaje dominante
- TypeScript
- Estrellas
- 3.4k
- Forks
- 476
- Merge medio
- 10 d 21 h
- PR fusionados (30 d)
- 2
Descripción
## Environment
- react-native-pager-view: 6.5.1
- react: 18.3.1
- react-native: 0.76.5
- expo: 52.0.18
## Description
A page cannot be navigated to after being dynamically added. See also the reproduction repository's README.
## Reproducible Demo
### Setup
1. Clone repository: https://github.com/winghouchan/react-native-pager-view-dynamic-page-mcve.
2. Install dependencies (`yarn`).
3. Build the app (`npx expo prebuild` && `yarn ios`).
### Reproduction
1. After opening the app, press "Add new page and navigate to it".
A new page should be added and navigated to. Instead, the new page is added (seen in the component tree in dev tools) but not navigated to.
## Additional notes
Doing either of the following seems to work around the issue:
- Wrapping `setPage` in `setTimeout(..., 0)`
- Disabling React Native's new architecture (see `working-example` branch, a rebuild is required before running).
Guía de contribución
Línea de trabajo
Comienza con el repositorio de reproducción enlazado y su README, usando la configuración indicada y la acción “Add new page and navigate to it”. Compara el comportamiento normal con la rama working-example y la configuración new-architecture; se considera terminado cuando se puede navegar a una página añadida dinámicamente con las versiones indicadas sin ninguno de los dos workarounds.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- react-native, typescript
- Área
- mobile
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 45/100