Skip to content

E0304: Can't read an island's props ​

The compiler reads an imported component's props from its file (defineProps<…>(), a React component's typed props, Svelte's $props()). These props use a TypeScript type with no Go equivalent, or are declared in a way the compiler doesn't follow. Declare the props in Go instead, with a struct marked @ui.Island("path").

Wrong ​

vuka
// Bad.vue: defineProps<{ lookup: Map<string, number> }>()
import Bad "./islands/Bad.vue"
vuka
@ui.Island("./islands/Bad.vue")
type Bad struct {
	Lookup map[string]float64 `json:"lookup"`
}

Released under the MIT License. Vuka builds on Go and its tools, which are made by the Go Authors. Vuka is not affiliated with Google or the Go project. Go is a trademark of Google LLC.