Jump to content
Search Community

about using #id or .className to animate etc..

vlbn test
Moderator Tag

Recommended Posts

i am wondering if there are PROS and CONS about using either #id or .classNames. 
 

this came to my mind thinking about my previous post where i had to use REFS to animate a couple elements with a timeline inside a component. but since i moved the code to a mixin i found out i could remove them and just use the #id or .className of the items and the timeline worked perfectly.
 

so.. just out of curiosity i was wondering... are there any recomendations about this? should i use only #id tags and let the .classNames for what they are intended?

thanks for reading me!

Edited by dnvdk
forgot to add link to previous post
Link to comment
Share on other sites

Hey dnvdk. I don't understand your question. Are you asking when you should use a selector string vs a Vue reference? When using a framework like Vue we recommend always using references so that you know that your elements won't be switched out from under you as easily. 

  • Like 1
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...