/
gen_TodoApp_reactGen.go
51 lines (39 loc) · 1.36 KB
/
gen_TodoApp_reactGen.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// Code generated by myitcv.io/react/cmd/reactGen. DO NOT EDIT.
package immtodoapp
import "myitcv.io/react"
type TodoAppElem struct {
react.Element
}
func buildTodoApp(cd react.ComponentDef) react.Component {
return TodoAppDef{ComponentDef: cd}
}
func buildTodoAppElem(children ...react.Element) *TodoAppElem {
return &TodoAppElem{
Element: react.CreateElement(buildTodoApp, nil, children...),
}
}
func (t TodoAppDef) RendersElement() react.Element {
return t.Render()
}
// SetState is an auto-generated proxy proxy to update the state for the
// TodoApp component. SetState does not immediately mutate t.State()
// but creates a pending state transition.
func (t TodoAppDef) SetState(state TodoAppState) {
t.ComponentDef.SetState(state)
}
// State is an auto-generated proxy to return the current state in use for the
// render of the TodoApp component
func (t TodoAppDef) State() TodoAppState {
return t.ComponentDef.State().(TodoAppState)
}
// IsState is an auto-generated definition so that TodoAppState implements
// the myitcv.io/react.State interface.
func (t TodoAppState) IsState() {}
var _ react.State = TodoAppState{}
// GetInitialStateIntf is an auto-generated proxy to GetInitialState
func (t TodoAppDef) GetInitialStateIntf() react.State {
return t.GetInitialState()
}
func (t TodoAppState) EqualsIntf(val react.State) bool {
return t == val.(TodoAppState)
}