-
Hi, How do I include my component in the Is the For example, the below code produces the following error message: component Counter {
state counter = 0
fun increment {
next { counter: counter + 1 }
}
fun render {
<div>
<span>
counter
</span>
<button onClick={increment}>
"Increment"
</button>
</div>
}
}
component Main {
<Counter />
} |
Beta Was this translation helpful? Give feedback.
Answered by
jgarte
Apr 3, 2025
Replies: 1 comment
-
Answer to self 🦆
I didn't implement the fun render {
<div><Counter/></div>
} Complete Examplecomponent Counter {
state counter = 0
fun increment {
next { counter: counter + 1 }
}
fun render {
<div>
<span>
counter
</span>
<button onClick={increment}>
"Increment"
</button>
</div>
}
}
component Main {
fun render {
<Counter/>
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
gdotdesign
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Answer to self 🦆
I didn't implement the
render
function:Complete Example