Skip to content
Gx
GitHub

GX1001: component file name is not an exported identifier

A component has the name of its file.

Cause

A component has the name of its file. The name must be an exported Go identifier, so it starts with an upper-case letter.

Example

ui/card/card.gx
package card

<article>Text</article>

gx check reports:

gx check
ui/card/card.gx:1:1: GX1001: component file name "card" must be an exported Go identifier

Fix

Rename the file. For example, change card.gx to Card.gx.