UNPKG

reshow-return

Version:

reshow-return (simple connect component with reshow-flux)

16 lines (14 loc) 375 B
// @ts-check import * as React from "react"; import { useMemo } from "react"; import build from "reshow-build"; /** * @param {any} [props] * @returns {?React.ReactElement} */ var MemoReturn = function MemoReturn(props) { return useMemo(function () { return build(props.children)(props.actualProps || props.props); }, [props.props]); }; export default MemoReturn;