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
{{ message }}
This repository has been archived by the owner on Apr 13, 2023. It is now read-only.
throws this error: ComponentClass is not a constructor
with this stack:
TypeError: ComponentClass is not a constructor at getQueriesFromTree (/Users/alex/djcode/another_example_app/frontend/src/server.ts:48:23) at getQueriesFromTree (/Users/alex/djcode/another_example_app/frontend/src/server.ts:67:5) at /Users/alex/djcode/another_example_app/frontend/src/server.ts:73:54 at forEachSingleChild (/Users/alex/djcode/another_example_app/frontend/node_modules/react/lib/ReactChildren.js:52:8) at traverseAllChildrenImpl (/Users/alex/djcode/another_example_app/frontend/node_modules/react/lib/traverseAllChildren.js:69:5) at traverseAllChildren (/Users/alex/djcode/another_example_app/frontend/node_modules/react/lib/traverseAllChildren.js:164:10) at Object.forEachChildren [as forEach] (/Users/alex/djcode/another_example_app/frontend/node_modules/react/lib/ReactChildren.js:72:3) at getQueriesFromTree (/Users/alex/djcode/another_example_app/frontend/src/server.ts:73:14) at getQueriesFromTree (/Users/alex/djcode/another_example_app/frontend/src/server.ts:67:5) at getQueriesFromTree (/Users/alex/djcode/another_example_app/frontend/src/server.ts:67:5)
This occurs only with Stateless Components, which work fine when rendered on the client but break when rendered on the server with react-apollo and react-router.
That's interesting, I'm pretty sure it does work in some cases (for instance GitHunt has some SFCs). In any case, I'm going to refactor this code soon, thanks for reporting it.
This line: https://github.com/apollostack/react-apollo/blame/master/src/server.ts#L48
throws this error:
ComponentClass is not a constructor
with this stack:
This occurs only with Stateless Components, which work fine when rendered on the client but break when rendered on the server with react-apollo and react-router.
This is the immediately surrounding code:
When I only have class-based components, everything works. When I have a Stateless component anywhere in my hierarchy, I get the above error.
Version
The text was updated successfully, but these errors were encountered: