Framer Motion RAC wrappers #4813
              
                Unanswered
              
          
                  
                    
                      devongovett
                    
                  
                
                  asked this question in
                Q&A
              
            Replies: 1 comment 3 replies
-
| 
         @jrmyio maybe I'm misunderstanding, but I think   | 
  
Beta Was this translation helpful? Give feedback.
                  
                    3 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
Thanks @devongovett
I am loving react-aria-components so far. However, when trying to use
framer-motionI think I am running into a limitation of not being able to set the underlying component that is being rendered.I can do
const AnimatedButton = motion(Button);as you proposed, however, what if I want the animation to depend on the hover / press states and animate the actual<button/>element this way. I have no access to those properties wheras support foras/componentType/elementType/componentor anasChild-method , will allow me wrap a nativebuttonelement (or in this casemotion.button) and check the data/aria attributes in that wrapper to set the animation.I am aware I can go back to using the react-aria hooks, but having built a design system on top of both the hooks, and the RAC, I can say the RAC is much much nicer to work with.
Aside from this issue , and some internals of the
RAC table, I haven't come accross limitations of the RCA so far. I really don't want to go give up RAC :)Originally posted by @jrmyio in #4058 (comment)
Beta Was this translation helpful? Give feedback.
All reactions