Giter Site home page Giter Site logo

gov8react's Introduction

gov8react

React SSR with Go V8 binding

Usage

Usage of .bin/gov8react:
  -http_addr string
        http listen address (default "0.0.0.0:3000")
  -with_hydration
        render with hydration

Command

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

Current State

  1. Hydration will load large bundle
  2. 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, see GO_APP.render(args) function.

Stack

  1. Go (v8 binding)
  2. React
  3. rspack
  4. @emotion/css

Limitations

These are the limitation that we found and these may comes because we lack of knowledges:

  1. Node capabilities, v8 binding does not comes with node.js capabilities likes fs, buffer, etc. Working around with some polyfills.
  2. @emotion/react not working, cache seems always empty, still don't know.
  3. Code split will be hard things to do, because v8 context cannot refer/lookup webpack split files easily.

Contributing

Please refer to CONTRIBUTING.md.

Questions

  1. How's the performance?

gov8react's People

Contributors

adityalstkp avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

liushuai05

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.