UNPKG

@googleforcreators/react

Version:

A tiny wrapper package that re-exports React and provides additional utilities and custom hooks.

3 lines (2 loc) 460 B
"use strict";var e=require("react");var r="undefined"!=typeof WEB_STORIES_ENV&&"development"===WEB_STORIES_ENV?function(r,t){const c=e.useRef();e.useEffect((()=>{if(c.current){const e=Object.keys({...c.current,...t}),n={};e.forEach((e=>{c.current&&c.current[e]!==t[e]&&(n[e]={from:c.current[e],to:t[e]})})),Object.keys(n).length&&console.log("[why-did-you-update]",r,n)}c.current=t}))}:()=>null;module.exports=r; //# sourceMappingURL=useWhyDidYouUpdate.js.map