Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/25.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs 如何在Nextjs中分割跨越`_app.tsx`和` pages/index.tsx`的长任务?_Reactjs_Next.js - Fatal编程技术网

Reactjs 如何在Nextjs中分割跨越`_app.tsx`和` pages/index.tsx`的长任务?

Reactjs 如何在Nextjs中分割跨越`_app.tsx`和` pages/index.tsx`的长任务?,reactjs,next.js,Reactjs,Next.js,我使用NextJS,并尝试提高CoreWebVitals的性能。 我想将跨越\u app.tsx和pages/index.tsx的长任务分开 在上图中,左侧的树用于\u app.tsx,右侧的树用于页面/index.tsx。 我可以简单地异步运行它,但我不知道如何使用NextJS 有什么好办法吗

我使用NextJS,并尝试提高CoreWebVitals的性能。 我想将跨越
\u app.tsx
pages/index.tsx
的长任务分开

在上图中,左侧的树用于
\u app.tsx
,右侧的树用于
页面/index.tsx
。 我可以简单地异步运行它,但我不知道如何使用NextJS

有什么好办法吗