Ace
TTCTheo's Typesafe Cult
•Created by Ace on 3/23/2024 in #questions
Next.js and GSAP rendering
Hey guys.
So I am working with GSAP pretty heavily and obviously I don't want to rely too much on the 'use client' directive.
So I decided to write my components like this:
Component.tsx -> Data setup and HTML Rendering
Component.animations.tsx -> Animations / Interactivity [use client]
Component.module.css -> CSS Stuff
So the idea was to separate animations from the actual content so I can benefit from server side rendering and animations as well. I'm pretty sure its an okay solution but wanted to ask the hive mind:
is that viable? am I wasting my time? forgetting anything?
Thanks!
3 replies