start function is not firing up the Copilot Steps

Đang mở
#350 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
react-native, typescript
Lĩnh vực
mobile

Hướng nghiên cứu

Bắt đầu từ dòng được tham chiếu trong src/Components/Tabs/Schedule.tsx và lần theo đường đi của useCopilot start/onLayout. Tái hiện hành vi trên React Native 0.83.0 với newArchEnabled=true, so sánh với 0.77.3; hoàn tất khi start luôn kích hoạt đáng tin cậy các bước và sự kiện của Copilot.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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]
Ngôn ngữ chính
TypeScript
Star
2.4k
Fork
425
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của mohebifar/react-native-copilot

Tất cả issue của mohebifar/react-native-copilot

Issue tương tự

Thêm issue về TypeScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.