Add signal support
Some checks failed
Lint / lint (push) Failing after 9s

This commit is contained in:
Julien Valverdé
2026-01-04 18:13:09 +01:00
parent 7f1be2cd1d
commit eae6647b7e
3 changed files with 58 additions and 21 deletions

View File

@@ -14,15 +14,12 @@ const TextEdit = Component.fromClass(Godot.TextEdit)
* A form UI where React controls the state
*/
export function ControlledFormRoot() {
const rootRef = CenterContainer.useRef()
Component.useSignal(rootRef, "ready", () => {
console.log("ready")
})
return (
<CenterContainer
ref={rootRef}
anchors_preset={Godot.Control.LayoutPreset.PRESET_FULL_RECT}
ready={function(this) {
console.log("ready")
}}
>
<PanelContainer>
<MarginContainer>