react: myitcv.io/react Index | Files | Directories

package react

import "myitcv.io/react"

Package react is a set of GopherJS bindings for Facebook's React, a Javascript library for building user interfaces.

For more information see https://github.com/myitcv/react/wiki

Index

Package Files

a_elem.go br_elem.go button_elem.go code_elem.go core.go css.go dangerous_inner_html.go div_elem.go events.go footer_elem.go form_elem.go fragment_elem.go gen_AProps_reactGen.go gen_BrProps_reactGen.go gen_ButtonProps_reactGen.go gen_CodeProps_reactGen.go gen_DivProps_reactGen.go gen_FooterProps_reactGen.go gen_FormProps_reactGen.go gen_H1Props_reactGen.go gen_H3Props_reactGen.go gen_H4Props_reactGen.go gen_HrProps_reactGen.go gen_IFrameProps_reactGen.go gen_IProps_reactGen.go gen_ImgProps_reactGen.go gen_InputProps_reactGen.go gen_LabelProps_reactGen.go gen_LiProps_reactGen.go gen_NavProps_reactGen.go gen_OptionProps_reactGen.go gen_PProps_reactGen.go gen_PreProps_reactGen.go gen_SelectProps_reactGen.go gen_SpanProps_reactGen.go gen_TableProps_reactGen.go gen_TextAreaProps_reactGen.go gen_UlProps_reactGen.go gen_css_cssGen.go h1_elem.go h3_elem.go h4_elem.go hr_elem.go i_elem.go iframe_elem.go img_elem.go input_elem.go label_elem.go li_elem.go nav_elem.go option_elem.go p_elem.go pre_elem.go react.go select_elem.go span_elem.go table_elem.go textarea_elem.go ul_elem.go unsafe.go

type AElem Uses

type AElem struct {
    Element
}

AElem is the React element definition corresponding to the HTML <a> element

func A Uses

func A(props *AProps, children ...Element) *AElem

A creates a new instance of a <a> element with the provided props and children

type AProps Uses

type AProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    Href                    string
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role   string
    Style  *CSS
    Target string
    Title  string
}

AProps defines the properties for the <a> element

type BasicElement Uses

type BasicElement struct {
    *BasicNode
}

type BasicHTMLElement Uses

type BasicHTMLElement struct {
    *BasicElement

    ID        string `js:"id" react:"omitempty"`
    Key       string `js:"key" react:"omitempty"`
    ClassName string `js:"className"`
    Role      string `js:"role"`
    Style     *CSS   `js:"style"`

    OnChange `js:"onChange"`
    OnClick  `js:"onClick"`

    DangerouslySetInnerHTML *DangerousInnerHTML `js:"dangerouslySetInnerHTML"`
}

type BasicNode Uses

type BasicNode struct {
    // contains filtered or unexported fields
}

type BrElem Uses

type BrElem struct {
    Element
}

BrElem is the React element definition corresponding to the HTML <br> element

func Br Uses

func Br(props *BrProps) *BrElem

Br creates a new instance of a <br> element with the provided props

type BrProps Uses

type BrProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Style *CSS
}

BrProps defines the properties for the <br> element

type ButtonElem Uses

type ButtonElem struct {
    Element
}

ButtonElem is the React element definition corresponding to the HTML <button> element

func Button Uses

func Button(props *ButtonProps, children ...Element) *ButtonElem

Button creates a new instance of a <button> element with the provided props and child

type ButtonProps Uses

type ButtonProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Style *CSS
    Type  string
}

ButtonProps defines the properties for the <button> element

type CSS Uses

type CSS struct {
    FontSize  string
    FontStyle string
    Height    string
    Left      string
    MarginTop string
    MaxHeight string
    MinHeight string
    Overflow  string
    OverflowY string
    Position  string
    Resize    string
    Top       string
    Width     string
    ZIndex    string
    // contains filtered or unexported fields
}

CSS defines CSS attributes for HTML components. Largely based on https://developer.mozilla.org/en-US/docs/Web/CSS/Reference

type CodeElem Uses

type CodeElem struct {
    Element
}

CodeElem is the React element definition corresponding to the HTML <code> element

func Code Uses

func Code(props *CodeProps, children ...Element) *CodeElem

Code creates a new instance of a <code> element with the provided props

type CodeProps Uses

type CodeProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Style *CSS
}

CodeProps defines the properties for the <code> element

type Component Uses

type Component interface {
    RendersElement() Element
}

type ComponentBuilder Uses

type ComponentBuilder func(elem ComponentDef) Component

type ComponentDef Uses

type ComponentDef struct {
    // contains filtered or unexported fields
}

ComponentDef is embedded in a type definition to indicate the type is a component

func (ComponentDef) Children Uses

func (c ComponentDef) Children() []Element

func (ComponentDef) Props Uses

func (c ComponentDef) Props() Props

func (ComponentDef) SetState Uses

func (c ComponentDef) SetState(i State)

func (ComponentDef) State Uses

func (c ComponentDef) State() State

type DangerousInnerHTML Uses

type DangerousInnerHTML struct {
    // contains filtered or unexported fields
}

DangerousInnerHTML is convenience definition that allows HTML to be directly set as the child of a DOM element. See https://facebook.github.io/react/docs/dom-elements.html#dangerouslysetinnerhtml for more details

func NewDangerousInnerHTML Uses

func NewDangerousInnerHTML(s string) *DangerousInnerHTML

NewDangerousInnerHTML creates a new DangerousInnerHTML instance, using the supplied string as the raw HTML

type DivElem Uses

type DivElem struct {
    Element
}

DivElem is the React element definition corresponding to the HTML <div> element

func Div Uses

func Div(props *DivProps, children ...Element) *DivElem

Div creates a new instance of a <div> element with the provided props and children

type DivProps Uses

type DivProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Style *CSS
}

DivProps are the props for a <div> component

type Element Uses

type Element = core.Element

func CreateElement Uses

func CreateElement(buildCmp ComponentBuilder, newprops Props, children ...Element) Element

func Render Uses

func Render(el Element, container dom.Element) Element

type Event Uses

type Event interface{}

type FooterElem Uses

type FooterElem struct {
    Element
}

FooterElem is the React element definition corresponding to the HTML <footer> element

func Footer(props *FooterProps, children ...Element) *FooterElem

Footer creates a new instance of a <footer> element with the provided props and children

type FooterProps Uses

type FooterProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Style *CSS
}

FooterProps are the props for a <footer> component

type FormElem Uses

type FormElem struct {
    Element
}

FormElem is the React element definition corresponding to the HTML <form> element

func Form Uses

func Form(props *FormProps, children ...Element) *FormElem

Form creates a new instance of a <form> element with the provided props and children

type FormProps Uses

type FormProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Style *CSS
}

FormProps defines the properties for the <form> element

type FragmentElem Uses

type FragmentElem struct {
    Element
}

FragmentElem is the special React Fragment element definition. Fragments let you group a list of children without adding extra nodes to the DOM. See https://reactjs.org/docs/fragments.html for more details.

func Fragment Uses

func Fragment(children ...Element) *FragmentElem

Fragment creates a new instance of a <React.Fragment> element with the provided children

type H1Elem Uses

type H1Elem struct {
    Element
}

H1Elem is the React element definition corresponding to the HTML <h1> element

func H1 Uses

func H1(props *H1Props, children ...Element) *H1Elem

H1 creates a new instance of a <h1> element with the provided props and child

type H1Props Uses

type H1Props struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Style *CSS
}

H1Props defines the properties for the <h1> element

type H3Elem Uses

type H3Elem struct {
    Element
}

H3Elem is the React element definition corresponding to the HTML <h3> element

func H3 Uses

func H3(props *H3Props, children ...Element) *H3Elem

H3 creates a new instance of a <h3> element with the provided props and child

type H3Props Uses

type H3Props struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Style *CSS
}

H3Props defines the properties for the <h3> element

type H4Elem Uses

type H4Elem struct {
    Element
}

H4Elem is the React element definition corresponding to the HTML <h4> element

func H4 Uses

func H4(props *H4Props, children ...Element) *H4Elem

H4 creates a new instance of a <h4> element with the provided props and children

type H4Props Uses

type H4Props struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Style *CSS
}

H4Props defines the properties for the <h4> element

type HrElem Uses

type HrElem struct {
    Element
}

HrElem is the React element definition corresponding to the HTML <hr> element

func Hr Uses

func Hr(props *HrProps) *HrElem

Hr creates a new instance of a <hr> element with the provided props

type HrProps Uses

type HrProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Style *CSS
}

HrProps defines the properties for the <hr> element

type IElem Uses

type IElem struct {
    Element
}

IElem is the React element definition corresponding to the HTML <i> element

func I Uses

func I(props *IProps, children ...Element) *IElem

I creates a new instance of a <i> element with the provided props and children

type IFrameElem Uses

type IFrameElem struct {
    Element
}

IFrameElem is the React element definition corresponding to the HTML <iframe> element

func IFrame Uses

func IFrame(props *IFrameProps, children ...Element) *IFrameElem

IFrame creates a new instance of a <iframe> element with the provided props and children

type IFrameProps Uses

type IFrameProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role   string
    Src    string
    SrcDoc string
    Style  *CSS
}

IFrameProps are the props for a <iframe> component

type IProps Uses

type IProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Src   string
    Style *CSS
}

IProps are the props for a <i> component

type ImgElem Uses

type ImgElem struct {
    Element
}

ImgElem is the React element definition corresponding to the HTML <Img> element

func Img Uses

func Img(props *ImgProps, children ...Element) *ImgElem

Img creates a new instance of a <Img> element with the provided props and children

type ImgProps Uses

type ImgProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Src   string
    Style *CSS
}

ImgProps are the props for a <Img> component

type InputElem Uses

type InputElem struct {
    Element
}

InputElem is the React element definition corresponding to the HTML <input> element

func Input Uses

func Input(props *InputProps) *InputElem

Input creates a new instance of a <input> element with the provided props

type InputProps Uses

type InputProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    DefaultValue            string
    ID                      string
    Key                     string

    OnChange
    OnClick

    Placeholder string
    Role        string
    Style       *CSS
    Type        string
    Value       string
}

InputProps defines the properties for the <input> element

type LabelElem Uses

type LabelElem struct {
    Element
}

LabelElem is the React element definition corresponding to the HTML <label> element

func Label Uses

func Label(props *LabelProps, child Element) *LabelElem

Label creates a new instance of a <label> element with the provided props and child element

type LabelProps Uses

type LabelProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    For                     string
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Style *CSS
}

LabelProps defines the properties for the <label> element

type LiElem Uses

type LiElem struct {
    Element
}

LiElem is the React element definition corresponding to the HTML <li> element

func Li Uses

func Li(props *LiProps, children ...Element) *LiElem

Li creates a new instance of an <li> element with the provided props and children

func (*LiElem) RendersLi Uses

func (l *LiElem) RendersLi(*LiElem)

type LiProps Uses

type LiProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Style *CSS
}

LiProps defines the properties for the <li> element

type NavElem struct {
    Element
}

NavElem is the React element definition corresponding to the HTML <nav> element

func Nav(props *NavProps, children ...Element) *NavElem

Nav creates a new instance of a <nav> element with the provided props and children

type NavProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Style *CSS
}

NavProps defines the properties for the <nav> element

type OnChange Uses

type OnChange interface {
    Event

    OnChange(e *SyntheticEvent)
}

type OnClick Uses

type OnClick interface {
    Event

    OnClick(e *SyntheticMouseEvent)
}

type OptionElem Uses

type OptionElem struct {
    Element
}

OptionElem is the React element definition corresponding to the HTML <option> element

func Option Uses

func Option(props *OptionProps, child Element) *OptionElem

Option creates a new instance of a <option> element with the provided props

type OptionProps Uses

type OptionProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Style *CSS
    Value string
}

OptionProps defines the properties for the <option> element

type PElem Uses

type PElem struct {
    Element
}

PElem is the React element definition corresponding to the HTML <p> element

func P Uses

func P(props *PProps, children ...Element) *PElem

P creates a new instance of a <p> element with the provided props and children

type PProps Uses

type PProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Style *CSS
}

PProps are the props for a <div> component

type PreElem Uses

type PreElem struct {
    Element
}

PreElem is the React element definition corresponding to the HTML <pre> element

func Pre Uses

func Pre(props *PreProps, children ...Element) *PreElem

Pre creates a new instance of a <pre> element with the provided props and children

type PreProps Uses

type PreProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Style *CSS
}

PreProps defines the properties for the <pre> element

type Props Uses

type Props interface {
    IsProps()
    EqualsIntf(v Props) bool
}

type RendersLi Uses

type RendersLi interface {
    Element
    RendersLi(*LiElem)
}

type S Uses

type S = core.S

S is the React representation of a string

type SelectElem Uses

type SelectElem struct {
    Element
}

SelectElem is the React element definition corresponding to the HTML <select> element

func Select Uses

func Select(props *SelectProps, children ...*OptionElem) *SelectElem

Select creates a new instance of a <select> element with the provided props and children

type SelectProps Uses

type SelectProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Style *CSS
    Value string
}

SelectProps are the props for a <select> component

type SpanElem Uses

type SpanElem struct {
    Element
}

SpanElem is the React element definition corresponding to the HTML <p> element

func Span Uses

func Span(props *SpanProps, children ...Element) *SpanElem

Span creates a new instance of a <p> element with the provided props and children

type SpanProps Uses

type SpanProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Style *CSS
}

SpanProps defines the properties for the <p> element

type State Uses

type State interface {
    IsState()
    EqualsIntf(v State) bool
}

type SyntheticEvent Uses

type SyntheticEvent struct {
    PreventDefault  func() `js:"preventDefault"`
    StopPropagation func() `js:"stopPropagation"`
    // contains filtered or unexported fields
}

func (*SyntheticEvent) Target Uses

func (s *SyntheticEvent) Target() dom.HTMLElement

type SyntheticMouseEvent Uses

type SyntheticMouseEvent struct {
    *SyntheticEvent

    ClientX int `js:"clientX"`
}

type TableElem Uses

type TableElem struct {
    Element
}

TableElem is the React element definition corresponding to the HTML <table> element

func Table Uses

func Table(props *TableProps, children ...Element) *TableElem

Table creates a new instance of a <table> element with the provided props and children

type TableProps Uses

type TableProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Style *CSS
}

TableProps are the props for a <table> component

type TextAreaElem Uses

type TextAreaElem struct {
    Element
}

TextAreaElem is the React element definition corresponding to the HTML <textarea> element

func TextArea Uses

func TextArea(props *TextAreaProps, children ...Element) *TextAreaElem

TextArea creates a new instance of a <textarea> element with the provided props and children

type TextAreaProps Uses

type TextAreaProps struct {
    ClassName               string
    Cols                    uint
    DangerouslySetInnerHTML *DangerousInnerHTML
    DefaultValue            string
    ID                      string
    Key                     string

    OnChange
    OnClick

    Placeholder string
    Role        string
    Rows        uint
    Style       *CSS
    Value       string
}

TextAreaProps defines the properties for the <textarea> element

type UlElem Uses

type UlElem struct {
    Element
}

UlElem is the React element definition corresponding to the HTML <ul> element

func Ul Uses

func Ul(props *UlProps, children ...RendersLi) *UlElem

Ul creates a new instance of a <ul> element with the provided props and <li> children

type UlProps Uses

type UlProps struct {
    ClassName               string
    DangerouslySetInnerHTML *DangerousInnerHTML
    ID                      string
    Key                     string

    OnChange
    OnClick

    Role  string
    Style *CSS
}

UlProps defines the properties for the <ul> element

Directories

PathSynopsis
cmd/cssGencssGen is a temporary code generator for the myitcv.io/react.CSS type
cmd/reactGenreactGen is a go generate generator that helps to automate the process of writing GopherJS React web applications.
cmd/reactVetreactVet is a vet program used to check the correctness of myitcv.io/react based packages.
cmd/reactVet/_testFiles
cmd/stateGenstateGen is a go generate generator that helps to automate the process of creating state trees for use in GopherJS React web applications.
cmd/stateGen/_testFiles
components/imm
examples
examples/blog/2017_04_16
examples/hellomessage
examples/immtodoapp
examples/markdowneditor
examples/sites/examplesshowcase
examples/sites/globalstate
examples/sites/globalstate/model
examples/sites/globalstate/state
examples/sites/hellomessage
examples/sites/helloworld
examples/sites/helloworldbootstrap
examples/sites/immtodoapp
examples/sites/latency
examples/sites/markdowneditor
examples/sites/present
examples/sites/timer
examples/sites/todoapp
examples/timer
examples/todoapp
internal/bundle
internal/core
internal/dev
internal/preact
internal/prod
internal/testutils
jsxPackage jsx allows you to render blocks of HTML as myitcv.io/react elements.
testutils

Package react imports 7 packages (graph) and is imported by 28 packages. Updated 2018-01-16. Refresh now. Tools for package owners.