effectussoftware / react-custom-roulette

Repository for the react-custom-roulette library
MIT License
312 stars 112 forks source link

Add compatibility with Next.js / Typescript #70

Closed Amphaal closed 2 years ago

Amphaal commented 2 years ago

... so we can leverage Next.js dynamic() without throwing unknown types errors. We'll do something like this to use the wheel within a component :

const Wheel = dynamic<WheelProps>(
    () => import('react-custom-roulette').then(mod => mod.Wheel),
    { ssr: false }
)

Kinda fixes https://github.com/effectussoftware/react-custom-roulette/issues/57.

We might even consider adding explainations into the README.