I'm using React Router's Link component to handle page transition in my app.
My app is included in an external web page, which has some scripts (namely Google Tag Manager) that define events on links on the document level.
This causes a conflict with Link events : page is always reloading when clicking on a link.
I tried to stop propagation on my Link component with an onClick callback, with no luck : <Link onClick={(e) => { e.stopPropagation(); }} [...]>...</Link>
I see that Link events are also defined on the document level, so I don't know how to stop the external events.
Any clue on this one ?
Thank you !
from React Router Link reloading page : Conflict with external event
No comments:
Post a Comment