React SSR with Go V8 binding
Usage of .bin/gov8react:
-http_addr string
http listen address (default "0.0.0.0:3000")
-with_hydration
render with hydration
For those who want to try
make setup # install deps
make build-all-client # build all client artifacts
go run cmd/http/*.go -with_hydration true
- Hydration will load large bundle
- React is only for the UI and will not be as data fetcher (like
graphql
SSR or anything), data to React is always coming from go, seeGO_APP.render(args)
function.
- Go (v8 binding)
- React
rspack
@emotion/css
These are the limitation that we found and these may comes because we lack of knowledges:
- Node capabilities, v8 binding does not comes with node.js capabilities likes
fs
,buffer
, etc. Working around with some polyfills. @emotion/react
not working,cache
seems always empty, still don't know.- Code split will be hard things to do, because v8 context cannot refer/lookup webpack split files easily.
Please refer to CONTRIBUTING.md.
- How's the performance?