github.com/jgarto/itcv@v0.0.0-20180826224514-4eea09c1aa0d/examples/immtodoapp/gen_TodoApp_reactGen.go (about)

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