I am wondering wether completion handler server method call is possible in Next.js or only the await
approach as most tutorial show?
We would collect the codes REact Native and Next.js both uses in a parent folder, but await willl not help us.
HomePage.getInitialProps = async () => {
const initialData = {};
await registerTempUser();
const homeData = await homePageData;
const events = await eventList;
initialData.homePageData = homeData.data;
initialData.events = events.data;
return { initialData: initialData, namespacesRequired: ["translate"] };
};
question from:
https://stackoverflow.com/questions/66062607/how-to-use-completion-handler-in-next-js 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…