civiccc / civiccc/react-waypoint

OnEnter event only called on page load using react router

Open
#249 10 comments 0 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
4k
Forks
206
PR merge metrics
No merged PRs in 30d

Description

Hi - I know this issue has been flagged up a few times already, but none of the solutions (or the latest version) solve this for me.

I am having the exact same problem with Waypoint. Im using the latest version, however when switching pages via react router, the onEnter function doesn't get called when reaching the waypoint. On a fresh page reload it works as expected however.

Additionally, my react app has a few different pages (via react router), all with waypoints on, and on for some reason the waypoints work once, and then never again. My app is pulling data from a web service on each onEnter event, however these events are not being fired consistently, either only on page load, or just once and never again.

Thanks!
Justin

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the Waypoint onEnter behavior while navigating between pages with React Router, comparing route changes with a fresh page reload. Done means onEnter fires consistently whenever a waypoint is reached, including after repeated navigation; the report names no files or tests to inspect.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.