Gazebo_simulation-Frontend/node_modules/.cache/babel-loader/c1190ec5ca443939805ec6ed22dd11ea.json
2020-12-31 20:18:50 +00:00

1 line
475 B
JSON

{"ast":null,"code":"import useUpdatedRef from './useUpdatedRef';\nimport { useEffect } from 'react';\n/**\n * Attach a callback that fires when a component unmounts\n *\n * @param fn Handler to run when the component unmounts\n */\n\nexport default function useWillUnmount(fn) {\n var onUnmount = useUpdatedRef(fn);\n useEffect(function () {\n return function () {\n return onUnmount.current();\n };\n }, []);\n}","map":null,"metadata":{},"sourceType":"module"}