You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Warning: Functions are not valid as a React child. This may happen if you return a Component instead of <Component /> from render. Or maybe you meant to call this function rather than return it.
in Unknown (at _app.js:24)
in ThemeProvider (at _app.js:23)
in WagglioMainApp
in Container (created by AppContainer)
in AppContainer
Current _app.js looks like this:
import 'cross-fetch/polyfill';
import App from 'next/app';
import React from 'react';
import { ThemeProvider } from 'styled-components';
const theme = {};
class WagglioMainApp extends App {
// removed getInitialProps due to this https://github.com/zeit/next.js/blob/master/errors/opt-out-automatic-prerendering.md
// This function is for Material UI
componentDidMount() {
// Remove the server-side injected CSS.
const jssStyles = document.querySelector('#jss-server-side');
if (jssStyles) {
jssStyles.parentNode.removeChild(jssStyles);
}
}
render() {
const { Component, pageProps } = this.props;
return (
<ThemeProvider theme={theme}>
<Component {...pageProps} />
</ThemeProvider>
);
}
}
export default WagglioMainApp;
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
@HaNdTriX totally right! Completely missed that one. Thanks for pointing it out and thanks for the work with the apollo example. It has been very helpful!
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.
vercel
locked as resolved and limited conversation to collaborators
Jan 30, 2022
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Examples bug report
Example name
with-apollo
Describe the bug
Getting this error:
Current _app.js looks like this:
To Reproduce
Steps to reproduce the behavior, please provide code snippets or a repository:
Expected behavior
App should start without errors
System information
The text was updated successfully, but these errors were encountered: