diff --git a/README.md b/README.md index b4964ce..6a92704 100644 --- a/README.md +++ b/README.md @@ -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). @@ -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 @@ -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 # diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..54eebf4 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module github.com/rocketlaunchr/react + +go 1.10 \ No newline at end of file