Skip to content

rocketlaunchr/react

Repository files navigation

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.

The package is production ready but it should be noted that the elements sub-package is not stable yet. Once stability is reached, version 1.0.0 will be tagged. The elements sub-package is optional but highly convenient. It is recommended your package manager locks to a commit id instead of the master branch directly.

See Tutorial here.

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 HydrateProps() and HydrateState()
  • 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

Performance Tips

Future Work

  • Fork mapstructure and remove dependecy for fmt and net (short term)
  • Remove dependency for mapstructure (long term)
  • WebAssembly version

Legal Information

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

© 2018 PJ Engineering and Business Solutions Pty. Ltd.

Final Notes

Feel free to enhance features by issuing pull-requests.

Star the project to show your appreciation.