/ x / ruck@v5.0.0 / Effect.mjs

// @ts-check
import { createElement as h, Fragment, useEffect } from "react";
/** * A React component that runs a callback after children have mounted. * @param {object} props Props. * @param {() => void} props.callback Memoized callback. * @param {import("react").ReactNode} props.children React children. */export default function Effect({ callback, children }) { useEffect(callback, [callback]);
// Fragment is only to make TypeScript happy. return h(Fragment, null, children);}
Ruck is an open source buildless React web application framework for Deno.
GitHub Stars
Go to latest

Version Info

Tagged at
a month ago

External Dependencies