seagull-js / seagull

the core of the seagull framework
https://seagull-js.github.io/seagull/
GNU Lesser General Public License v3.0
10 stars 5 forks source link

113 hooks not supported #121

Closed levito closed 5 years ago

levito commented 5 years ago

Reproduce #113

Note: The new page test passes, but SSR won't work when visiting http://localhost:8080/hooks in the browser

codeclimate[bot] commented 5 years ago

Code Climate has analyzed commit 24135e62 and detected 0 issues on this pull request.

View more on Code Climate.

Harper04 commented 5 years ago

Thanks for the repro. I found the underlying issue. RouteContext imports import { render } from '@seagull/pages' and uses the default export of the SSR-Page-Bundle with the imported render function. Because render from @seagull/pages uses react-dom/server seagull uses a React/ReactDom from both inside the SSR-Page-Bundle and from the backend bundle.

I see two options:

cpa-gecko commented 5 years ago

fixed by https://github.com/seagull-js/seagull/pull/123