rnosov / react-reveal

Easily add reveal on scroll animations to your React app
https://www.react-reveal.com/
MIT License
2.73k stars 180 forks source link

Patche for react-reveal #116

Open papuruth opened 3 years ago

papuruth commented 3 years ago

Hi! πŸ‘‹

Firstly, thanks for your work on this project! πŸ™‚

Today I used patch-package to patch react-reveal@1.2.2 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/react-reveal/src/RevealBase.js b/node_modules/react-reveal/src/RevealBase.js
index b7df761..80694fe 100644
--- a/node_modules/react-reveal/src/RevealBase.js
+++ b/node_modules/react-reveal/src/RevealBase.js
@@ -370,7 +370,7 @@ class RevealBase extends React.Component {
     };
   }

-  componentWillReceiveProps (props) {
+  UNSAFE_componentWillReceiveProps (props) {
     if (props.when !== undefined)
       this.isOn = !!props.when;
     if (props.fraction !== this.props.fraction)

This issue body was partially generated by patch-package.