Open josias-r opened 1 year ago
hey! Would really appreciate a tutorial for react integration :) Great job with this library btw
Hi and thank you!
I currently can't get around to describe an in depth example.
But the basic really just is as simple as creating a new Boarding class instance in a useEffect from a custom hook and returning it as a useState instance.
In that useEffect you can define the steps of the tour (I recommend working with custom data-* attributes to target elements) and them simply start the tour by calling boarding.start() on your custom hook returned object on any button press or user event.
Since BoardingJS evaluates elements live during the tour it should work great in React apps, as is, since elements only need to be available once they are being targeted.
Hope that helps!
Show example how to integrate this library in a react application