@veracity/vui
Version:
Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.
17 lines (15 loc) • 572 B
JavaScript
import { forwardRef, memo } from "react";
//#region src/core/vui.ts
/**
* Component creation utility, which combines forwardRef, memo and ensures correct typing with all props included.
* Config object allows toggling memoization and providing custom 'areEqual' function.
*/
function vui(component, config) {
const { memoCompare, isMemo = true } = config ?? {};
if (isMemo) return memo(forwardRef(component), memoCompare);
return forwardRef(component);
}
//#endregion
export { vui as default, vui };
globalThis.__vuiVersion__ = "5.3.1"
//# sourceMappingURL=vui.js.map