react-joyride component name #631
-
Hi, this was really a great library, but i would like to know if this library also support to target a component name? as what i know the target was seems to be directed only on component className, example: ".my-first-app" or ".my-second-app". let's say i have a component on other file called "tutorialBasic", and i call them on my main App files using something like this . therefore i was thinking if i want to make the component name as the target, i was thinking it will be something like this: but of course it's not working, so i would like to know if this library supports to target a component by it's "name", not only by it's "classname". Thank you, and sorry for untidy question, i'm still new on using github. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
hey @vaishawil It's not possible as this library needs a DOMElement. Just to be clear the component doesn't have a className, but the markup it renders can have multiple elements with multiple classes. You could use a Also, it's a convention to name your components using PascalCase, so use |
Beta Was this translation helpful? Give feedback.
hey @vaishawil
It's not possible as this library needs a DOMElement.
Just to be clear the component doesn't have a className, but the markup it renders can have multiple elements with multiple classes.
You could use a
ref
but it has some limitations (the ref is assigned AFTER the first render) so you would have to set therun
prop as a state in your controller component and only change it to true after the component has mounted.Also, it's a convention to name your components using PascalCase, so use
TutorialBasic
instead.