diff --git a/react/react.go b/react/react.go index 8d1864b0..2b4f566f 100644 --- a/react/react.go +++ b/react/react.go @@ -203,6 +203,12 @@ func createElement(cmp interface{}, props interface{}, children ...Element) Elem } } +func CreateElementFromJS(object *js.Object) Element { + return &elementHolder{ + Elem: object, + } +} + func buildReactComponent(typ reflect.Type, builder ComponentBuilder) *js.Object { compDef := object.New() compDef.Set(reactCompDisplayName, fmt.Sprintf("%v(%v)", typ.Name(), typ.PkgPath()))