import dynamic from "next/dynamic"
import React, { ReactNode } from "react";
type ButtonProps = {
type: string,
children: ReactNode,
onClick: () => void
}
const ButtonWrapper: React.ComponentType<{}> = dynamic(() => import('element-react').then((res: any) => { return res.Button }), { ssr: false})
export const Button: React.FC<ButtonProps> = (ButtonProps) => {
return <><ButtonWrapper {...ButtonProps}></ButtonWrapper></>
}
I tried to implement Element-React UI to my next.js project, and I got this warning, and I want to solve it. I didn't warn when I comment this component code.
Does anyone know how to solve this warning?
