Jump to content
Search Community

unflux

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by unflux

  1. Hello,

    I use GSAP with css modules and to avoid adding extra classes, i use css attribute selector like this :
     

    useLayoutEffect(() => {
      const ctx = gsap.context(() => {
        const sectionContent = gsap.utils.toArray('[class*="content"]'))
      }, sectionRef)
      return () => ctx.revert()
    }, [])

    So, the scoped class is enough : 
    <div className={`${styles.content}`}>

    I hope this helps.

    • Like 2
×
×
  • Create New...