I'm using introjs-react package for my project but I'm facing a problem of interacting with multiple components..... As it is not able to select element which is not being rendered at first but at second step I'm rendering component on the screen (by history.push) but still it is not selecting it and showing element is null.
<Steps
enabled={enableSteps}
steps={steps}
initialStep={initialStep}
options={{
showStepNumbers: false,
showBullets: false,
exitOnOverlayClick: false,
doneLabel: "Finish",
nextLabel: "Next",
hideNext: true,
showProgress: true
}}
onChange={(index) => changeSteps(index)}
onStart={index => startSteps(index)}
onExit={(index) => exitSteps(index)}
/>
this is the steps component
const changeSteps = (index) => {
if (index === 2) {
history.push('/notifications');
}
}
here I am just trying to go to another page notifications which is not being rendered at first.....due to which selector is not working and is not selecting elements in notification page