When I try to move the array of steps out of the component (for example, move to a separate file or to a custom hook), I can only pass Stings to the "title" and "content" props, and cannot pass ReactNode.
To Reproduce
Just move any existing array of steps you may have to an external file and then try to pass ReactNode to "title" or "content" instead of strings.
Expected behavior
Being able to pass ReactNode to "title" and "content" props after moving the array of steps to an external place (separate file and/or hook).
In this example, I have 3 different arrays of steps.
The first array is located inside App.tsx, and in each step I provide "ReactNode" to the title and content - this example is working fine .
The 2nd and 3rd arrays are located in an external file called "externalData.ts".
The 2nd array is working but only if it receive strings in the title and content.
the 3rd array is not working (and commented), there I tried to use HTML elements and styled-components as title and content.
Run npx envinfo --system --binaries --npmPackages react-joyride
🐛 Bug Report
When I try to move the array of steps out of the component (for example, move to a separate file or to a custom hook), I can only pass Stings to the "title" and "content" props, and cannot pass ReactNode.
To Reproduce
Just move any existing array of steps you may have to an external file and then try to pass ReactNode to "title" or "content" instead of strings.
Expected behavior
Being able to pass ReactNode to "title" and "content" props after moving the array of steps to an external place (separate file and/or hook).
Link to repl or repo (highly encouraged)
https://codesandbox.io/s/affectionate-glade-qrfv4y?file=/src/App.tsx
In this example, I have 3 different arrays of steps. The first array is located inside App.tsx, and in each step I provide "ReactNode" to the title and content - this example is working fine . The 2nd and 3rd arrays are located in an external file called "externalData.ts". The 2nd array is working but only if it receive strings in the title and content. the 3rd array is not working (and commented), there I tried to use HTML elements and styled-components as title and content.
Run
npx envinfo --system --binaries --npmPackages react-joyride
Paste the results here: