Skip to content

Commit

Permalink
- add go.mod
Browse files Browse the repository at this point in the history
- update readme
  • Loading branch information
rocketlaunchr-cto committed Jul 26, 2019
1 parent 2e8fb07 commit 650a228
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
11 changes: 4 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@ Facebook's React is one of the most dominant libraries for front-end development

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.
The package is **production ready**. An optional (but highly convenient) `elements` sub-package is also included.

See [Tutorial here](https://medium.com/@rocketlaunchr.cloud/go-with-react-de5ee4f01df9).

Expand All @@ -29,7 +28,7 @@ The examples can be [found here](https://github.com/rocketlaunchr/react/tree/mas

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

Expand All @@ -41,19 +40,17 @@ The examples can be [found here](https://github.com/rocketlaunchr/react/tree/mas

## Performance Tips

* Use `-m` command line flag to instruct gopher.js to minify code. Then minify further with [Webpack/UglifyJS](https://github.com/gopherjs/gopherjs/issues/136). A Webpack tutorial can be [found here](https://medium.com/ag-grid/webpack-tutorial-understanding-how-it-works-f73dfa164f01).
* Use `-m` command line flag to instruct gopher.js to minify code. Then bundle+minify further with [Rollup.js](https://rollupjs.org) xor [Webpack/UglifyJS](https://github.com/gopherjs/gopherjs/issues/136). A Webpack tutorial can be [found here](https://medium.com/ag-grid/webpack-tutorial-understanding-how-it-works-f73dfa164f01).
* Apply [gzip compression](https://en.wikipedia.org/wiki/HTTP_compression)
* Use int instead of (u)int8/16/32/64
* Use float64 instead of float32
* Try to avoid importing `fmt` package (either directly or indirectly).
* Avoid importing `fmt` at all costs (including indirectly).
* 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](https://github.com/dave/jsgo) is appropriate for your web-based project.

## Future Work

* Fork [mapstructure](https://github.com/mitchellh/mapstructure) and remove dependecy for `fmt` and `net` (short term)
* Remove dependency for [mapstructure](https://github.com/mitchellh/mapstructure) (long term)
* WebAssembly version

#
Expand Down
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module github.com/rocketlaunchr/react

go 1.10

0 comments on commit 650a228

Please sign in to comment.