Skip to content
This repository was archived by the owner on Aug 27, 2018. It is now read-only.

Examples

Paul Jolly edited this page Mar 15, 2017 · 45 revisions

A fully-working GopherJS React application can be found here, the source of which can be found here

I will try to maintain the live version @master of these examples

Get it working locally

Requires:

go get -u github.com/myitcv/gopherjs/react/examples

# amend GOPATH and PATH to use the vendored code
export GOPATH="$(go list -f '{{.Dir}}' github.com/myitcv/gopherjs)/_vendor:$GOPATH"
export PATH="$(go list -f '{{.Dir}}' github.com/myitcv/gopherjs)/_vendor/bin:$PATH"

cd $(go list -f '{{.Dir}}' github.com/myitcv/gopherjs/react/examples)
npm install
go install github.com/gopherjs/gopherjs
gopherjs serve -w

Now navigate to http://localhost:8080/github.com/myitcv/gopherjs/react/examples/

More details

The components defined as part of this correspond (quite closely) to the React homepage examples:

The Examples container component is a simple wrapper for showcasing the above examples.

Creating a GopherJS React application

See here

Clone this wiki locally