matthieua / WOW

Reveal CSS animation as you scroll down a page
https://www.delac.io/WOW/
9.92k stars 4.11k forks source link

When I use it in React,get error “Uncaught TypeError: Cannot set properties of undefined (setting 'getPropertyValue')” #372

Open mengxianglong123 opened 1 year ago

veraLX commented 1 year ago

Hello,我是林昕,我已收到来信~

wangxuan1314 commented 10 months ago

Yes, Vue also has this problem。

veraLX commented 10 months ago

Hello,我是林昕,我已收到来信~

wangxuan1314 commented 10 months ago

I seem to know why this is happening. When installing dependencies, some will install wow.js, while others will install wowjs. That's where my problem lies. It should be installing wow.js

lisonge commented 7 months ago

I use vite5+vue2.7, The following is my solution

  1. Remove the import in the JS code

    // import 'wowjs/css/libs/animate.css'
    // import { WOW } from 'wowjs'
  2. use cdn url script/link

    <script src="
    https://cdn.jsdelivr.net/npm/wowjs@1.1.3/dist/wow.min.js
    "></script>
    <link href="
    https://cdn.jsdelivr.net/npm/wowjs@1.1.3/css/libs/animate.min.css
    " rel="stylesheet">
veraLX commented 7 months ago

Hello,我是林昕,我已收到来信~