You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi. I am having trouble implementing the part from the title. The code is supposed to check if users have already seen the joyride tour, but it runs after every page refresh. I thought that in my useEffect, but clearly I am doing something wrong. This is my code. Could you point me in the correct direction?
import React from 'react';
import { ReactNode, useCallback, useEffect, useMemo, useState } from 'react';
import Joyride, { ACTIONS, CallBackProps, STATUS, Step } from 'react-joyride';
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hi. I am having trouble implementing the part from the title. The code is supposed to check if users have already seen the joyride tour, but it runs after every page refresh. I thought that in my useEffect, but clearly I am doing something wrong. This is my code. Could you point me in the correct direction?
import React from 'react';
import { ReactNode, useCallback, useEffect, useMemo, useState } from 'react';
import Joyride, { ACTIONS, CallBackProps, STATUS, Step } from 'react-joyride';
const joyrideStyles = {
options: {
primaryColor: '#0046CF',
arrowColor: '0046CF',
},
};
export default function UseTour(steps: Step[], localStorageKey: string | null): ReactNode {
const [run, setRun] = useState(false);
}
Beta Was this translation helpful? Give feedback.
All reactions