HiDeoo / intro.js-react

Intro.js react wrapper
MIT License
407 stars 58 forks source link

Intro js is not working in next js. #83

Closed alanvera48 closed 2 years ago

alanvera48 commented 2 years ago

I am try to use intro js and intro js react in next js app but i does not work. I try to use like this https://codesandbox.io/s/bk6xj but it returns an error like Element is not defined

blackge commented 2 years ago

Same issue here.

omridevk commented 2 years ago

if you import it like this:

const Steps = dynamic(() => import('intro.js-react').then((mod) => mod.Steps), {
    ssr: false,
});

It should work

HiDeoo commented 2 years ago
const Steps = dynamic(() => import('intro.js-react').then((mod) => mod.Steps), {
    ssr: false,
});

@omridevk is 100% correct. If needed, here is a CodeSandbox example.