튜토리얼 이어서 실행하기
하나의 튜토리얼 가이드가 완료된 후, 다른 튜토리얼 가이드를 순서대로 실행하는 방법을 안내합니다.
nextGuides 옵션 이해하기
nextGuides 옵션 이해하기Guide Option Parameters 의 nextGuides 속성을 사용하면, 특정 가이드가 완료되었을 때 자동으로 이어 실행될 가이드를 지정할 수 있습니다.
StepBy.startGuide("example-guide-id", {
nextGuides: [
// An item in the Next Guides list
{ guideId: "{guideId}", version: "{versionName}" },
],
})nextGuides는 배열(Array) 형태로 전달되며, 각 항목은 실행될 가이드를 정의하는 객체입니다.
nextGuides 항목 속성
key
type
desc
required
default
guideId
string
실행할 가이드 고유 ID
version
string
실행할 가이드 버전
해당 가이드의 최신 버전
예시 코드
아래 예제에서는 'example-guide-a'가 완료된 후, 자동으로 'example-guide-b'가 실행되도록 설정합니다.
StepBy.startGuide("example-guide-a", {
nextGuides: [
{ guideId: "example-guide-b" },
],
})nextGuides는 배열을 입력받으며, 여러 개의 가이드를 설정하면 배열 순서대로 실행됩니다.
StepBy.startGuide("example-guide-a", {
nextGuides: [
{ guideId: "example-guide-b" },
{ guideId: "example-guide-c", version: "v3" },
],
})따라서 위 코드에서는 "example-guide-a" → "example-guide-b" → "example-guide-c" 순서로 가이드가 실행됩니다.
Last updated