All Projects → rocketlaunchr → react

rocketlaunchr / react

Licence: other
Super lightweight Go bindings for react.js

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to react

Instago
Download/access photos, videos, stories, story highlights, postlives, following and followers of Instagram
Stars: ✭ 59 (-54.62%)
Mutual labels:  gopherjs
Gopherjs Vue
VueJS bindings for gopherjs
Stars: ✭ 142 (+9.23%)
Mutual labels:  gopherjs
Lute
🎼 一款对中文语境优化的 Markdown 引擎,支持 Go 和 JavaScript。A structured Markdown engine that supports Go and JavaScript.
Stars: ✭ 222 (+70.77%)
Mutual labels:  gopherjs
Vdom
A virtual dom implementation written in go which is compatible with gopherjs
Stars: ✭ 83 (-36.15%)
Mutual labels:  gopherjs
Godom
Make DOM manipulation in Go as similar to JavaScript as possible. (via GopherJS or WebAssembly)
Stars: ✭ 125 (-3.85%)
Mutual labels:  gopherjs
Vecty
Vecty lets you build responsive and dynamic web frontends in Go using WebAssembly, competing with modern web frameworks like React & VueJS.
Stars: ✭ 2,161 (+1562.31%)
Mutual labels:  gopherjs
Vecty Router
A declarative client-side router for Vecty applications.
Stars: ✭ 24 (-81.54%)
Mutual labels:  gopherjs
qlql
No description or website provided.
Stars: ✭ 26 (-80%)
Mutual labels:  gopherjs
Glua
Maybe you should use https://github.com/fiatjaf/flua instead of this
Stars: ✭ 142 (+9.23%)
Mutual labels:  gopherjs
Golymer
Web components with golang (gopherjs) moved to gitlab.com/microo8/golymer
Stars: ✭ 220 (+69.23%)
Mutual labels:  gopherjs
Grpcweb Example
An example implementation of a GopherJS client and a Go server using the Improbable gRPC-Web implementation
Stars: ✭ 85 (-34.62%)
Mutual labels:  gopherjs
Gu
A web ui library for Go. [DEPRECATED]
Stars: ✭ 102 (-21.54%)
Mutual labels:  gopherjs
Lute
🎼 一款结构化的 Markdown 引擎,支持 Go 和 JavaScript。
Stars: ✭ 211 (+62.31%)
Mutual labels:  gopherjs
Userpages
my blog for sharing (source code for siongui.github.io)
Stars: ✭ 64 (-50.77%)
Mutual labels:  gopherjs
React
MOVED TO https://github.com/myitcv/x/blob/master/react/_doc/README.md
Stars: ✭ 234 (+80%)
Mutual labels:  gopherjs
Gopherjs Electron
Gopherjs bindings for Electron with an API translator.
Stars: ✭ 26 (-80%)
Mutual labels:  gopherjs
Gr
Aka Go React: GopherJS bindings for Facebook React. NOTE: Still early and not production ready.
Stars: ✭ 162 (+24.62%)
Mutual labels:  gopherjs
iris
The interpreter of ISLisp
Stars: ✭ 58 (-55.38%)
Mutual labels:  gopherjs
gox
JSX for Go
Stars: ✭ 165 (+26.92%)
Mutual labels:  gopherjs
Vue
The progressive framework for WebAssembly applications.
Stars: ✭ 211 (+62.31%)
Mutual labels:  gopherjs

react

Go with React GoDoc Go Report Card

Facebook's React is one of the most dominant libraries for front-end development around. Google's Go programming language is one of the most elegantly crafted languages for server development. Why not combine the two?

This package is an extremely thin wrapper over the native react.js API. The objective was to make it light-weight, developer-friendly and intuitive. You shouldn’t have to scour the documentation to get going — a few peeks should be adequate. If you know your way around the React API and you know a bit of Go, then you should be able to make prototypes and production-worthy applications in no time.

This package is best suited for making cross-platform Desktop applications using these technologies:

The package is production ready. An optional (but highly convenient) elements sub-package is also included.

See Tutorial here.

the project to show your appreciation.

Dependencies

Installation

go get -u github.com/rocketlaunchr/react

Examples

The examples can be found here:

Uptime Timer

  • How to create React class components
  • How to pass props from parent to child
  • How to use UnmarshalProps() and UnmarshalState()
  • How to use state() and setState()
  • How to create strongly-typed structured props and states

Event Handling

  • How to create React functional components
  • How to handle events (and pass extra arguments)
  • How to create a Ref and interact with dom object directly

Desktop Application

  • 100% written in Go
  • Cross-platform (macOS, Win, Linux)
  • Electron.js based
  • How to bundle javascript dependencies using rollup.js

Performance Tips

  • Use -m command line flag to instruct gopher.js to minify code. Then bundle+minify further with rollup.js xor Webpack/UglifyJS. A Webpack tutorial can be found here.
  • Apply gzip compression
  • Use int instead of (u)int8/16/32/64
  • Use float64 instead of float32
  • Avoid importing fmt at all costs (including indirectly). Use fmtless instead.
  • Avoid importing net/http for http requests (including indirectly). Use gopherjs-xhr instead.
  • Until GopherJS supports Go1.13+, avoid using the standard libraries context package because it uses fmt. Instead use context from forks sub-package.
  • Avoid importing honnef.co/go/js/dom if possible.
  • Use react.JSFn() and use native javascript functions as much as possible.
  • https://github.com/gopherjs/gopherjs/wiki/JavaScript-Tips-and-Gotchas
  • See if jsgo is appropriate for your web-based project.
  • To reduce file size, copy only what's required from elements sub-package.
  • For json unmarshaling, try slim-decoder or use json

Future Work

  • WebAssembly version Help Required

Other useful packages

  • dataframe-go - Statistics and data manipulation
  • dbq - Zero boilerplate database operations for Go
  • electron-alert - SweetAlert2 for Electron Applications
  • igo - A Go transpiler with cool new syntax such as fordefer (defer for for-loops)
  • mysql-go - Properly cancel slow MySQL queries
  • remember-go - Cache slow database queries

Legal Information

The license is a modified MIT license. Refer to LICENSE file for more details.

© 2018-20 PJ Engineering and Business Solutions Pty. Ltd.

Final Notes

Feel free to enhance features by issuing pull-requests.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].