UNPKG

one

Version:

One is a new React Framework that makes Vite serve both native and web.

25 lines (24 loc) 720 B
import React from "react"; var Decorated = Symbol(), withStaticProperties = function (component, staticProps) { var next = function () { if (component[Decorated]) { var _ = React.forwardRef(function (props, ref) { return React.createElement(component, { ...props, ref }); }); for (var key in component) { var v = component[key]; _[key] = v && typeof v == "object" ? { ...v } : v; } } return component; }(); return Object.assign(next, staticProps), next[Decorated] = !0, next; }; export { withStaticProperties }; //# sourceMappingURL=withStaticProperties.native.js.map