Calling start() on useEffect does not register/use all steps, only the first one

オープン
#322 コメント 10 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
38/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
react-native, typescript
領域
mobile-dev

調査の方向性

exampleフォルダーとuseCopilot/startパスから始め、指定されたReact Nativeセットアップで提供されたuseEffectのケースを再現します。start()との相対関係でステップがいつ登録されるかを追跡します。doneとは、登録されたすべてのステップがそれぞれ独自のコンテンツを持ち、Nextが最初のコンテンツを繰り返すのではなく、対応するコンテンツを順に進めることを意味します。

索引モデルが issue の本文から書いたものです。

説明

Current Behavior
Calling start on useEffect does not register steps. After clicking "next" it moves to next walkthrouable item, but in the current step always displays the first step content.
However, totalSteps displays correct number of steps.

import { useCopilot } from 'react-native-copilot';

const { start }  = useCopilot();

useEffect(() => {
 start()
},[])

[.. in the return function as in /example folder]

Expected behavior/code
Steps are registered and "next" press works correctly.

Environment

  • Device: [iPhone 15 Pro Max Simulator]
  • OS: [17.4]
  • react-native-copilot: [3.3.2]
  • react-native: [71.14]
  • react-native-svg: [14.0.0]

Possible Solution

I was able to solve this by adding timeout of 3s in the useEffect.
setTimeout(() => { start() }, 3000

Additional context/Screenshots
I don't know why it happens, any idea how we can fix it?

主要言語
TypeScript
スター
2.4k
フォーク
425
PR マージ指標
30日以内にマージされた PR はありません

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

mohebifar/react-native-copilot のほかの issue

mohebifar/react-native-copilot の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。