wilsonianb / c8s

Codius-less: web-monetized serverless Kubernetes add-on
Apache License 2.0
3 stars 0 forks source link

react-web-monetization doesn't support server-side rendering #21

Closed wilsonianb closed 4 years ago

wilsonianb commented 4 years ago

Rendering code using react-web-monetization server-side results in a document is not defined error.

The fact that it uses hooks (useEffect) prevents hiding it behind a useState hook (Invariant Violation: Rendered more hooks than during the previous render.)

wilsonianb commented 4 years ago

https://github.com/sharafian/react-web-monetization/pull/3

wilsonianb commented 4 years ago

Resolved by https://github.com/wilsonianb/c8s/commit/70807441c6f2e559af815a2f12e5d71dbabdc87d