github.com/jgarto/itcv@v0.0.0-20180826224514-4eea09c1aa0d/examples/gen_ImmExamples_reactGen.go (about) 1 // Code generated by reactGen. DO NOT EDIT. 2 3 package examples 4 5 import "myitcv.io/react" 6 7 type ImmExamplesElem struct { 8 react.Element 9 } 10 11 func buildImmExamples(cd react.ComponentDef) react.Component { 12 return ImmExamplesDef{ComponentDef: cd} 13 } 14 15 func buildImmExamplesElem(children ...react.Element) *ImmExamplesElem { 16 return &ImmExamplesElem{ 17 Element: react.CreateElement(buildImmExamples, nil, children...), 18 } 19 } 20 21 func (i ImmExamplesDef) RendersElement() react.Element { 22 return i.Render() 23 } 24 25 // SetState is an auto-generated proxy proxy to update the state for the 26 // ImmExamples component. SetState does not immediately mutate i.State() 27 // but creates a pending state transition. 28 func (i ImmExamplesDef) SetState(state ImmExamplesState) { 29 i.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 ImmExamples component 34 func (i ImmExamplesDef) State() ImmExamplesState { 35 return i.ComponentDef.State().(ImmExamplesState) 36 } 37 38 // IsState is an auto-generated definition so that ImmExamplesState implements 39 // the myitcv.io/react.State interface. 40 func (i ImmExamplesState) IsState() {} 41 42 var _ react.State = ImmExamplesState{} 43 44 // GetInitialStateIntf is an auto-generated proxy to GetInitialState 45 func (i ImmExamplesDef) GetInitialStateIntf() react.State { 46 return i.GetInitialState() 47 } 48 49 func (i ImmExamplesState) EqualsIntf(val react.State) bool { 50 return i == val.(ImmExamplesState) 51 }