2016-12-07 70 views
2

wowJSが働いていないようです。と反応して反応しない

私はimport WOW from 'wowjs';

componentDidMount() { 
    const wow = new WOW(); 
    wow.init(); 
} 

を行うが、私はimport { WOW } from 'wowjs';

をすれば、私がすれば、私は

MutationObserver is not supported by your browser. WOW.js cannot detect dom mutations, please call .sync() after loading new content.

を取得TypeError: _wowjs2.default is not a constructor

を得る

componentDidMount() { 
    const wow = new WOW(); 
    wow.sync(); 
} 

私はそこに立ち往生TypeError: Cannot read property 'nodeType' of undefined

を得る:(

+0

このパッケージはちょうど完全に壊れているようです。https://github.com/matthieua/WOW/issues/252 –

+0

あなたは反応してトランジションを行うために推薦できる他のパッケージですか? –

答えて

0

あなたが書く必要があります注意してくださいwow.sync()

import WOW from 'wowjs'; 

componentDidMount() { 
    const wow = new WOW.WOW(); 
    wow.init(); 
} 

お知らせWOW WOW前に()。

+1

これもうまくいきませんでした。私はちょうど短い '新しいWOW.WOW()。init()'を使用しましたが、それでも動作しません。レンダリングされたhtmlでアニメーションクラスが実際に追加されているのがわかりますが、アニメーションは実行されません。 –

関連する問題