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
Copy file name to clipboardExpand all lines: README.md
+34Lines changed: 34 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -180,6 +180,40 @@ Use `this.props.start(fromStep, onStop)` in the root component in order to trigg
180
180
181
181
The `onStop` method will be called after a user selects 'Skip' or 'Finish' buttion in the tooltip.
182
182
183
+
### Listening to the events
184
+
Along with `this.props.start()`, `copilot` HOC passes `copilotEvents` function to the component to help you with tracking of tutorial progress. It utilizes [mitt](https://github.com/developit/mitt) under the hood, you can see how full API there.
185
+
186
+
List of available events is:
187
+
188
+
-`start` — Copilot tutorial has started.
189
+
-`stop` — Copilot tutorial has ended or skipped.
190
+
-`stepChange` — Next step is triggered. Passes [`Step`](https://github.com/okgrow/react-native-copilot/blob/master/src/types.js#L2) instance as event handler argument.
0 commit comments