acdlite / acdlite/redux-router

ReduxRouter does not remove hashchange-listener on unmount

Abierto
#132 0 comentarios 0 reacciones 0 asignados Ver en GitHub
bug
Lenguaje dominante
JavaScript
Estrellas
2.3k
Forks
194
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

When unmounting an React-app with ReactDOM.unmountComponentAtNode() the hashchange-listener of createHistory is not removed. It is added by the history.listen call in client.js, but the returned unlisten-function is not stored and never called.
Somehow the unlisten function needs to get called in ReduxRouter.componentWillUnmount().

As a quickfix, I added the unlisten-function to the returned store of historySynchronization() and called it from ReduxRouter.componentWillUnmount, but I guess thats not the best way to do it...

Thx for your help!

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.