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