How to get react-joyride to wait for a component to be available? #1049
Replies: 1 comment 2 replies
-
Hey @brianteeter Did you check the MultiRoute demo? |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
So we've used react-joyride to build a simple multi page tour of a web application in react. The tour works great, however, we've noted when clicking 'Back' that the tour sometimes fails in cases where the page has to navigate back to a different URL and the components being targeted have not yet rendered. We don't see this behavior going forward in the tour only back. This is the error we get in console:
Target not mounted {event: 'click', placement: 'bottom', offset: 10, disableBeacon: false, disableCloseOnEsc: false, …}content: {$$typeof: Symbol(react.element), type: 'p', key: null, ref: null, props: {…}, …}data: {prev: '/analytics', next: '/analytics'}disableBeacon: falsedisableCloseOnEsc: falsedisableOverlay: falsedisableOverlayClose: truedisableScrollParentFix: truedisableScrolling: trueevent: "click"floaterProps: {options: {…}, wrapperOptions: {…}, disableAnimation: false, offset: 30, styles: {…}}hideBackButton: falsehideCloseButton: falsehideFooter: falseisFixed: falselocale: {back: 'Back', close: 'Close', last: 'Finish', next: 'Next', open: 'Open the dialog', …}offset: 10placement: "bottom"showProgress: falseshowSkipButton: truespotlightClicks: falsespotlightPadding: 20styles: {beacon: {…}, beaconInner: {…}, beaconOuter: {…}, tooltip: {…}, tooltipContainer: {…}, …}target: "#analytics-report-button"title: "Analytics Report"[[Prototype]]: Object
I'd like to modify the code or tour to simply wait up to 3 seconds for a component to be available before it throws this error. But doing this in the callback doesn't seem to work as its called after the event happens. Any tips or thoughts?
Beta Was this translation helpful? Give feedback.
All reactions