Git Product home page Git Product logo

go-reactive's Introduction

What, why?

Have you ever wanted to build something with WebAssembly and Go, as a React dev but scratch your head in confusion on how to start? Well, I had the same problem. This was why I decided to write this.

Whats it based on?

Since create-react-app already did the heavyweight work on creating a new React project, I decided to use it. Although I had to eject. This isnt recommended unless you REALLY know what you're doing. But I had to. So be careful with the Webpack config.

Also for now, it uses the default Go compiler. I hope to use tinygo so as to reduce the size of the compiled .wasm file

Requirement

  • npm/yarn as deemed fit (I used yarn for this though)
  • Go 1.12+ (I built this with v1.12.7)
  • Wasm supported browser. (I use brave as my daily driver and used it to test/run this).

How to run

  • clone this repo
  • cd into the src folder and run GOOS=js GOARCH=wasm go build -o ../client/public/main.wasm
  • cd into the client folder (preferrably in a different terminal window/tab) and run: yarn start
  • Open http://localhost:3000 and have fun ๐Ÿ˜‰๐Ÿ˜‰

Project Structure

src folder contains the main.go file which we're compiling to WebAssembly. client contains the normal (ejected) React app files and folders.

Milestone

[ ] Bash/Make file to install/build using tinygo [ ] DockerFile??

go-reactive's People

Contributors

oayomide avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.