Closed TipicultBiomassa closed 2 years ago
The example code you are copying uses Tailwind styling and I doubt things will work properly without it.
I don't know what Astro is.
Do you have a live link? I'll need to see this site in order to provide any more help.
The example code you are copying uses Tailwind styling and I doubt things will work properly without it.
I don't know what Astro is.
Do you have a live link? I'll need to see this site in order to provide any more help.
I know. Tailwind is added. Here is a proof that it will work without tailwind. https://codesandbox.io/s/rbeqjp?file=/src/App.tsx:465-483
Astro is static generator like NextJS or Gatsby. I think ref (ref={parallax.ref}) for my div is not working. My div doesn't have transform
It's super strange but looks like it's not working on JS create react app template but it works with typescript template.
Yeah. here it is It's not working but if you change both file ext to tsx insead of jsx and then relead a page - it will work. Why?
If you're switching to Javascript you need to remove the types in the code: useParallax<HTMLDivElement>()
should be just useParallax()
If you're switching to Javascript you need to remove the types in the code:
useParallax<HTMLDivElement>()
should be justuseParallax()
Sorry. It was so obvious but there were no highligting or anything
No worries
Support
I was trying to copy spinning example and i succeded using Astro but when i copy competely the same code in my default react app created using create-react-app it doesn't spin. Element doesn't have transorm style but in astro it's fine. I don't get it `
index: