react-activation icon indicating copy to clipboard operation
react-activation copied to clipboard

App.tsx:140 Uncaught TypeError: getCachingNodes is not a function

Open vaynevayne opened this issue 1 year ago • 0 comments

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])

vaynevayne avatar Aug 16 '24 09:08 vaynevayne