Skip to content

start function is not firing up the Copilot Steps #350

Description

@RAWLICK

Current Behavior
Everything was working fine till I was at react-native: 0.77.3. As soon as I upgraded to react-native: 0.83.0, I start getting issue of copilot-Steps not appearing or appearing after a lot of time then expected. I fire up the copilot events at start so I use onLayout but when it didn't appear, I tried to fire those events using start function with a Pressable Button but that didn't worked either. Also I have newArchEnabled=true which is essential for my build. Trying Below to give you some glimpse of my code:

Input Code

const { start, copilotEvents } = useCopilot();  // start is ran using onLayout in main View
const [lastEvent, setLastEvent] = useState<string | null>(null);

useEffect(() => {
      copilotEvents.on("stepChange", (step) => {
        setLastEvent(`stepChange: ${step?.name}`);
      });
      copilotEvents.on("start", () => {
        setLastEvent(`start`);
      });
      copilotEvents.on("stop", () => {
        setLastEvent(`stop`);
        dispatch(updateLocalStorageInfo("Schedule_Walkthrough_Completed"))
        console.log("Steps Completed")
      });
    }, [copilotEvents]);

<View style={styles.mainStyle} 
              onLayout={() => {
                 setTimeout(() => {
                    start(); 
                  }, 2000);
               }}>
  • Repo link (1596th Line):
https://github.com/RAWLICK/Rescheduler-App/blob/main/src/Components/Tabs/Schedule.tsx

Expected behavior/code
start function should normally fire up the copilot events as it was working before

Environment

  • Device: [Realme P4x]
  • OS: [Android 15]
  • react-native-copilot: [3.3.3]
  • react-native: [0.83.0]
  • react-native-svg: [15.15.1]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions