react-activation
react-activation copied to clipboard
App.tsx:140 Uncaught TypeError: getCachingNodes is not a function
getCachingNodes is not a function TypeError: getCachingNodes is not a function
const { dropScope, clear, getCachingNodes } = useAliveController()
useEffect(() => {
console.log('prevPathname', prevPathname)
const toChild = location.pathname.startsWith(prevPathname || '')
console.log('toChild', toChild)
const cachingNodes = getCachingNodes()
console.log('cachingNodes', cachingNodes)
if (!toChild) {
if (cachingNodes.some(node => node.name === prevPathname)) {
const reg = `${prevPathname}`
console.log('reg', reg)
dropScope(new RegExp(reg))
}
}
}, [location.pathname])