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