Closed MihailoMilic closed 1 year ago
HOC isn't the problem, deprecated Tilt from react-tilt is. Here's what you need to do:
Just simply uninstall the library by running the command "npm uninstall react-tilt --legacy-peer-deps" and then installing react-parallax-tilt by the command "npm install react-parallax-tilt".
Wherever you import {Tilt} from 'react-tilt' change it to this: import Tilt from 'react-parallax-tilt'
Don't touch SectionWrapper or exports, they're fine :)
@ArsenKakasyan Thank you for the comment! I resolved the issue long ago, problem was that I surrounded the arguments of the HOC by curly brackets. I'm new to GitHub so I completely forgot to close the thread. Kind Regards.
HOC code inside SectionWrapper.jsx:
Applying HOC to my component About inside About.jsx
I get an error
When I delete
<Component/>
from the HOC the code works just fine so I assume the problem has something to do with how I passed the About component into the SectionWrapper(), but the youtube video regarding this project has the same code as me right now their works, so I am not sure what is the problem.