hexops / vecty

Vecty lets you build responsive and dynamic web frontends in Go using WebAssembly, competing with modern web frameworks like React & VueJS.
BSD 3-Clause "New" or "Revised" License
2.79k stars 144 forks source link

Packages issue with functions used from vecty framework! #278

Closed harshit9033 closed 2 years ago

harshit9033 commented 3 years ago

While performing a simple demo, I faced this issue:-

PS C:\Users\Harshit\go\src\vecty\example\hellovecty> go run hellovecty.go
# github.com/gopherjs/vecty
..\..\dom.go:1236:28: invalid operation: global.Get("document") == undefined (operator == not defined on struct)
..\..\dom_wasmjs_gopherjs.go:60:7: invalid operation: j == js.Null() (struct containing [0]func() cannot be compared)     
..\..\dom_wasmjs_gopherjs.go:63:7: invalid operation: j == js.Undefined() (struct containing [0]func() cannot be compared)
PS C:\Users\Harshit\go\src\vecty\example\hellovecty> 
VinceJnz commented 3 years ago

The hellovecty example is supposed to be compiled into a wasm file that is then served by a web server.

slimsag commented 2 years ago

As mentioned already, you need to follow the instructions found in the README here in order to successfully run the examples:

https://github.com/hexops/vecty/blob/main/example/README.md

Hope that helps!