Closed gcoombe closed 5 years ago
hadRouteChange
should be set to true
when Boomerang arrived on the page too late to capture the React Router event. If we don't let Boomerang know that the route had already changed and was missed then it will wait until the next route triggers (which will be a soft nav).You can skip the React specific setup and let the History plugin handle the spa hard beacon for you. In your config add {"History": {"enabled": true, "auto": true}}
Great thanks! Looking through the code it seemed like I could set auto to true but wanted to double check.
I am trying to use boomerang with a react app and am finding a couple of things confusing:
hadRouteChange
flag. The docs useonEnter
which is no longer in use in react-router 4. https://github.com/ReactTraining/react-router/blob/master/packages/react-router/docs/guides/migrating.md#on-properties . Is this supposed to represent if the route has changed (ex: loaded "#/overview" and has since changed to "#/details") or if the initial route has completed rendering?Any assistance on these questions would be helpful. I am finding it difficult to get the initial
spa_hard
event firing and answers to these questions would help me narrow down the cause. I get an event if I passtrue
tohadRouteChange
but not if I pass false.