Answers for "next js _app getinitialprops"

0

next js _app getinitialprops

import App from 'next/app';

const MyApp = ({ Component, pageProps, apollo }) => (
  <ApolloProvider client={apollo}>
    <Component {...pageProps} />
  </ApolloProvider>
);

MyApp.getInitialProps = async (appContext) => {
  const appProps = await App.getInitialProps(appContext);
  return { ...appProps };
};

export default withApollo(appWithTranslation(MyApp));
Posted by: Guest on January-19-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language