- Examples Showcase - contains all the examples found in
myitcv.io/react/examples/...
- Hello World - a basic GopherJS React application generated by
reactGen -init minimal
- Hello World Bootstrap - a basic GopherJS React application generated by
reactGen -init bootstrap
hellomessage.HelloMessage
- demonstrates a component that can receive propstimer.Timer
- demonstrates a component that has statetodoapp.TodoApp
- demonstrates the use of state and event handling, but also the problems of having a non-comparable state struct typeimmtodoapp.TodoApp
- a reimplementation oftodoapp.TodoApp
using immutable data structuresmarkdowneditor.MarkdownEditor
- demonstrates the use of an external Javascript library.Latency
- a component-based version of TJ Holowaychuk's Latency Tools.- Global State Example - demonstrates the use of
stateGen
to create a global state tree that is shared between components. - Gopherize.me - a GopherJS React (frontend only) version of Ashley McNamara and Mat Ryer's original version.
present
browser client - a browser-basedpresent
equivalent for loading publicly accessible presentations- Syntax Viewer - a simple split-screen app for viewing the syntax trees of various languages.
Each of these examples are separate web applications, the source for which can be found here.
The sites use various example components that can be found in sub directories beneath here.
Requires:
- A working Go installation (at least
1.7
)
First:
go get -u myitcv.io/react/examples
# amend GOPATH and PATH to use the vendored code
export GOPATH="$(go list -f '{{.Dir}}' myitcv.io/react)/_vendor:$GOPATH"
export PATH="$(go list -f '{{.Dir}}' myitcv.io/react)/_vendor/bin:$PATH"
go install github.com/gopherjs/gopherjs
cd "$(go list -f '{{.Dir}}' myitcv.io/react)/examples/sites"
gopherjs serve
Each of the sites under sites/
are now available via http://localhost:8080/myitcv.io/react/examples/sites