我是一名开发人员一年了。我正在使用 next js 和 Material-ui ,没有任何问题。但是最近当我尝试一起使用 next js 和material-ui 时遇到一个问题。这就是闪烁的问题。你面临同样的问题还是只有我面临同样的问题?是材质 ui 还是下一个 js 的问题。那我该如何解决这个问题呢。
这是问题图片 - 请点击此处查看 Gif
这是我的项目 - https://github.com/siamahnaf198/ebuy-ts
这是实时链接 - https://ebuy-ts.vercel.app/
我需要知道如何定义下一个 jsContext类型及其req类型?
这里我写了这个getServerSideProps函数——
//Server side functions
export const getServerSideProps: GetServerSideProps = async (context) => {
await getMovies(context, context.req);
return { props: {} }
}
Run Code Online (Sandbox Code Playgroud)
我在这里写了这个函数 -
export const getMovies = (context: **types, req: **types) => {
//here the main function
}
Run Code Online (Sandbox Code Playgroud)
这里如何定义context类型和req类型?
请帮我?