Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Code splitting SSR warning #129

Open
falconmick opened this issue Aug 20, 2018 · 0 comments
Open

Code splitting SSR warning #129

falconmick opened this issue Aug 20, 2018 · 0 comments

Comments

@falconmick
Copy link
Contributor

@markmollart and I have found that we are getting the following warning from the server during development:

Warning: setState(...): Can only update a mounting component. This usually means you called setState() outside componentWillMount() on the server. This is a no-op.

This is being caused (to the best of my guesses and looking over source) by the componentWillMount call to setState inside of app/routes.jsx as we are calling setState inside of a callback.

I did some quick googling and apparently the solution is to via the webpack config file disable code splitting..Theoretically this query in the above file would no longer block and therefore would return within the componentWillMount call, thus causing the error to go away. google solution

Technically it's just a warning so we can ignore it, but I don't like warnings.

If either @AllanPooley @samlogan or myself can handle this, please assign yourself.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant