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