Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

findDOMNode is deprecated in StrictMode. findDOMNode was passed an instance of Tilt2 which is inside StrictMode. Instead, add a ref directly to the element you want to reference. #31

Closed
kirizarry47 opened this issue Mar 19, 2023 · 2 comments

Comments

@kirizarry47
Copy link

kirizarry47 commented Mar 19, 2023

I know I can remove the strict mode from app.jsx. I rather not , is there any other way to fix this ?

Thank you.
Screenshot 2023-03-19 at 2 38 58 PM

@kalyansaxena
Copy link

kalyansaxena commented Mar 19, 2023

yes, make use of react-parallax-tilt package instead of react-tilt

while importing you can import like bleow

import Tilt from 'react-parallax-tilt';

and provide props to the Tilt component instead of options property like below

<Tilt
      className='xs:w-[250px] w-full'
      tiltMaxAngleX={45}
      tiltMaxAngleY={45}
      scale={1}
      transitionSpeed={450}
    >

@kirizarry47
Copy link
Author

@kalyansaxena that worked perfectly thank you!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants