<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Himanshu Pant</title>
    <description>The latest articles on DEV Community by Himanshu Pant (@killdozerx2).</description>
    <link>https://dev.to/killdozerx2</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F378650%2F56597821-c2ad-416f-91ad-127ded9bb922.jpeg</url>
      <title>DEV Community: Himanshu Pant</title>
      <link>https://dev.to/killdozerx2</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/killdozerx2"/>
    <language>en</language>
    <item>
      <title>How to deal with stuck ECS deployment</title>
      <dc:creator>Himanshu Pant</dc:creator>
      <pubDate>Wed, 20 Dec 2023 06:28:03 +0000</pubDate>
      <link>https://dev.to/distinction-dev/how-to-deal-with-stuck-ecs-deployment-1mk3</link>
      <guid>https://dev.to/distinction-dev/how-to-deal-with-stuck-ecs-deployment-1mk3</guid>
      <description>&lt;p&gt;One of the hardest problems that I’ve ever dealt with in my life is making ECS deployments with Cloudformation work and work nicely, which is hard for some reason that only AWS knows.&lt;/p&gt;

&lt;h2&gt;
  
  
  TLDR
&lt;/h2&gt;

&lt;p&gt;If your cloudformation stack update containing ECS doesn’t finish in a reasonable amount of time(depends on previous deployment times and container image size), roughly 10-15 minutes. &lt;strong&gt;You have a problem with your service.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why does it stay stuck?
&lt;/h2&gt;

&lt;p&gt;Idk, it just does, this is one of those things that cloudformation(any deployment tool) really sucks at and CloudFormation waits for several hours before rolling back to a previous configuration. If the issue that's causing stack failure continues during stack rollback to a previous configuration, then the stack gets stuck in UPDATE_ROLLBACK_IN_PROGRESS status. Finally, the stack changes to UPDATE_ROLLBACK_FAILED status and that is DevOps hell.&lt;/p&gt;

&lt;h3&gt;
  
  
  What’s really happening though?
&lt;/h3&gt;

&lt;p&gt;ECS ***********&lt;strong&gt;&lt;em&gt;really&lt;/em&gt;&lt;/strong&gt;*********** likes to be stable and if it can’t be stable then it won’t finish updating(it won’t tell cloudformation that the update finished) and it won’t rollback either, so the main goal is to get the service to reach stability and there can be many reasons for it not reaching stability, however that is beyond the scope of this article.&lt;/p&gt;

&lt;h3&gt;
  
  
  So what could’ve gone wrong?
&lt;/h3&gt;

&lt;p&gt;Here are some common reasons why an Amazon ECS service can fail to launch new tasks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Container image issues&lt;/li&gt;
&lt;li&gt;A lack of necessary resources for launching tasks&lt;/li&gt;
&lt;li&gt;A health check failure on a load balancer&lt;/li&gt;
&lt;li&gt;Instance configuration or Amazon ECS container agent issues&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;An Amazon ECS service that fails to launch tasks causes AWS CloudFormation to get stuck in UPDATE_IN_PROGRESS status, and you can quick check this by going into the service and selecting deployments, and checking the status of the latest deployment.&lt;/p&gt;

&lt;h2&gt;
  
  
  So what do I even do now?
&lt;/h2&gt;

&lt;p&gt;Delete the stack and recreate!&lt;/p&gt;

&lt;p&gt;!&lt;a href="https://media0.giphy.com/media/0bc1ObnZK6IO0FkMV8/giphy.gif?cid=7941fdc64gt9sxd9juwjb3gft1b2qq3zgnmk2oxdassm15n0&amp;amp;ep=v1_gifs_search&amp;amp;rid=giphy.gif&amp;amp;ct=g"&gt;https://media0.giphy.com/media/0bc1ObnZK6IO0FkMV8/giphy.gif?cid=7941fdc64gt9sxd9juwjb3gft1b2qq3zgnmk2oxdassm15n0&amp;amp;ep=v1_gifs_search&amp;amp;rid=giphy.gif&amp;amp;ct=g&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The main goal is to get your cloudformation to say:- &lt;strong&gt;“Update Complete”&lt;/strong&gt; and it can take the AWS CloudFormation stack several hours to stabilize. To stabilize your stack more quickly, just lie to it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Disclaimer
&lt;/h3&gt;

&lt;p&gt;The following resolution is intended to help you stabilize an AWS CloudFormation stack quickly without waiting for the stack to time out. The resolution isn't intended for production environments, as the Amazon ECS service is out of sync with the known state of AWS CloudFormation. To sync resources between your Amazon ECS service and the AWS CloudFormation stack, you must perform an error-free update on the stack.&lt;/p&gt;

&lt;h2&gt;
  
  
  Resolution
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Change the desired task count of the Amazon ECS service to 0
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;Open the Amazon ECS console.&lt;/li&gt;
&lt;li&gt;Choose your cluster.&lt;/li&gt;
&lt;li&gt;Select the service, and then choose &lt;strong&gt;Update&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;Set &lt;strong&gt;Number of tasks&lt;/strong&gt; to &lt;strong&gt;0&lt;/strong&gt;, and then save the configuration.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  So what do I then?
&lt;/h2&gt;

&lt;p&gt;Get your service to run and stabilize, make sure the process can start.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Fixing 3rd party cookies issue with Firebase Auth</title>
      <dc:creator>Himanshu Pant</dc:creator>
      <pubDate>Sat, 14 May 2022 13:04:58 +0000</pubDate>
      <link>https://dev.to/killdozerx2/fixing-3rd-party-cookies-issue-with-firebase-auth-28ng</link>
      <guid>https://dev.to/killdozerx2/fixing-3rd-party-cookies-issue-with-firebase-auth-28ng</guid>
      <description>&lt;p&gt;Here's a scenario that might might have happened with you. You develop a great app with Firebase, your app supports log in with Google and other Social Identity providers, it works great when you're testing it, you connect your domain to firebase hosting and ship it and users start coming in, but then some of your users come to you(if you're lucky that some provide feedback) and they say, "I can't log in with Google, I click on the button, it takes me to Google but when it takes me back, nothing". You try to recreate, and you don't see the problem and you probably just mark it as PEBCAK, but you have just lost a potential customer and the culprit:- third party cookies.&lt;/p&gt;

&lt;h2&gt;
  
  
  Third Party Cookies
&lt;/h2&gt;

&lt;p&gt;I'm not going to try and explain the concept as you might have heard it enough number of times, so here are some great explanations.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/voralagas/javascript-interview-3-what-is-a-cookie-why-do-we-need-them-and-what-is-third-party-cookie-122c"&gt;dev.to&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://devowl.io/2021/first-party-cookies-third-party-cookies-definition/"&gt;DevOwl(where I shamelessly stole the image)&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  How does Firebase handle OAuth logins
&lt;/h3&gt;

&lt;p&gt;When you first create and app with firebase and enable auth, it creates an auth handler for you which can be accessed through the &lt;code&gt;_auth/handler&lt;/code&gt; path in the app domain, which is another thing firebase creates for you which is something like ".firebase.app".&lt;br&gt;
The way social login works with firebase is you redirect your users to this handler with the right query params and it takes care of OAuth verification for you, it sends your users to the OAuth provider(Google in our case) and google verifies and sends the user back to this handler.&lt;br&gt;
This handler is managed by firebase and is responsible for a bunch of auth related items like email verification, password reset, etc.&lt;br&gt;
Firebase hosting understands this handler's path and runs the handler instead of taking users to your app as well.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Note:- This is just a high level view. Don't quote me&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why does this bug appear?
&lt;/h3&gt;

&lt;p&gt;In the initial phase, the app was hosted on the default domain setup by firebase, but when you add your custom domain and send the user to that custom domain, firebase auth still sends the user to the base domain for this handler, making it a &lt;strong&gt;third party&lt;/strong&gt;.&lt;br&gt;
For example:- You add a custom domain in firebase hosting:- &lt;code&gt;app.domain.com&lt;/code&gt; but the handler is located at &lt;code&gt;&amp;lt;firebase_app_id&amp;gt;.firebase.app/_auth/handler&lt;/code&gt;. When we run &lt;code&gt;signInWithRedirect&lt;/code&gt;, it still sends the user the &lt;code&gt;&amp;lt;firebase_app_id&amp;gt;.firebase.app/_auth/handler&lt;/code&gt;, but the user came from &lt;code&gt;app.domain.com&lt;/code&gt; making &lt;code&gt;&amp;lt;firebase_app_id&amp;gt;.firebase.app/_auth/handler&lt;/code&gt; a third party.&lt;br&gt;
With the browser scenario changing and 3rd party cookies coming under more scrutiny by users and authorities alike, a lot of browsers now block third parties by default and some users do this on purpose. This causes the browser to apply third party cookie policy on &lt;code&gt;&amp;lt;firebase_app_id&amp;gt;.firebase.app/_auth/handler&lt;/code&gt;, preventing it from setting cookies and even accessing local-storage through iframe(which is what is happening). This is why some users can't log in, so the problem does not exist between chair and keyboard but between the browser and our app, which makes it our responsibility.&lt;/p&gt;

&lt;h3&gt;
  
  
  So how do we fix it
&lt;/h3&gt;

&lt;h4&gt;
  
  
  Simple answer?
&lt;/h4&gt;

&lt;p&gt;Ask the user to allow third party cookies 😎&lt;/p&gt;

&lt;h4&gt;
  
  
  Good answer? Make the handler available on &lt;code&gt;app.domain.com/_auth/handler&lt;/code&gt;, which can be achieved in x easy steps:-
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Update the &lt;code&gt;authDomain&lt;/code&gt; in firebase config to &lt;code&gt;app.domain.com&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;app.domain.com&lt;/code&gt; to authorized domains in Firebase Auth page, Firebase Auth -&amp;gt; Sign In methods and scroll down to see list&lt;/li&gt;
&lt;li&gt;Add &lt;code&gt;app.domain.com/__/auth/handler&lt;/code&gt; to authorized redirect URIs in google cloud console. 

&lt;ul&gt;
&lt;li&gt;Go to google cloud console.&lt;/li&gt;
&lt;li&gt;Select your firebase project.&lt;/li&gt;
&lt;li&gt;Go to -&amp;gt; APIs and Services -&amp;gt; Credentials.&lt;/li&gt;
&lt;li&gt;Edit the "OAuth 2.0 Client IDs"&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;🎉 Problem solved!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>firebase</category>
      <category>tutorial</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Using lax.js with a Vue project</title>
      <dc:creator>Himanshu Pant</dc:creator>
      <pubDate>Wed, 03 Jun 2020 12:09:58 +0000</pubDate>
      <link>https://dev.to/killdozerx2/using-lax-js-with-a-vue-project-3699</link>
      <guid>https://dev.to/killdozerx2/using-lax-js-with-a-vue-project-3699</guid>
      <description>&lt;p&gt;About me:- Hi, I'm Ansh and I have trouble communicating so please don't hate me if you don't like this post but criticism is welcome.&lt;/p&gt;

&lt;p&gt;If you don't know &lt;a href="https://github.com/alexfoxy/lax.js"&gt;lax.js&lt;/a&gt;, it is a simple yet elegant scroll animations library and did I mention &lt;strong&gt;light weight(3kb minified &amp;amp; zipped)&lt;/strong&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;I recently had to use scroll animations in my vue project but other libraries like AOS seemed to complex and frankly I like lax.js.&lt;br&gt;&lt;br&gt;
The author of the lax has also created a codepen with a vue sample but it doesn't seem to fall in line with the documentation.&lt;br&gt;
You can find the codepen &lt;a href="https://codepen.io/alexfoxy/pen/ZPRZBq"&gt;here&lt;/a&gt;.  &lt;/p&gt;

&lt;p&gt;Also I won't be walking you through the steps to create a new vue project using the vue-cli, because I'm sure that if you're reading this article, you have figured that out by now.&lt;br&gt;&lt;br&gt;
So let's get to it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;h3&gt;
  
  
  Start by installing lax.js
&lt;/h3&gt;


&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install &lt;/span&gt;lax.js
&lt;/code&gt;&lt;/pre&gt;

&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Now in your main.js file, import lax and add it as an instance property.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;Vue&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;vue&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;App&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./App.vue&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;router&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;./router&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="nx"&gt;lax&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;lax.js&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;Vue&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;prototype&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$lax&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;lax&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;Vue&lt;/span&gt;&lt;span class="p"&gt;({&lt;/span&gt;
    &lt;span class="nx"&gt;router&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
    &lt;span class="na"&gt;render&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;h&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;h&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;App&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}).&lt;/span&gt;&lt;span class="nx"&gt;$mount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;#app&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;I added lax as a vue instance property, because I wanted all components to be able to access it.  &lt;/p&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;Now in your App.vue, add the created and mounted hooks like so.&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;export&lt;/span&gt; &lt;span class="k"&gt;default&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
&lt;span class="na"&gt;methods&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;UpdateLax&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$lax&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;scrollY&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;requestAnimationFrame&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;UpdateLax&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="na"&gt;mounted&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;window&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;requestAnimationFrame&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;UpdateLax&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="na"&gt;created&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$lax&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;setup&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;Let me explain all that. In the created hook, we setup lax, this doesn't mean that lax will automatically listen to scroll event, we have to update it manually, that's where &lt;code&gt;requestAnimationFrame&lt;/code&gt; and our &lt;code&gt;UpdateLax&lt;/code&gt; method in, when the component is mounted we call &lt;code&gt;window.requestAnimationFrame&lt;/code&gt; and pass it the &lt;code&gt;UpdateLax&lt;/code&gt; method which will update lax with the amount that window has scrolled and recursively call itself on the next paint.  &lt;/p&gt;


&lt;/li&gt;
&lt;li&gt;

&lt;p&gt;Add animations in your component.&lt;br&gt;&lt;br&gt;
In the component that you want to add scroll animations add ref to the dom elements that you want animated. In my case it was the &lt;code&gt;heading&lt;/code&gt; and &lt;code&gt;v-tabs&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;template&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"sub-links"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;span&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"heading"&lt;/span&gt; &lt;span class="na"&gt;ref=&lt;/span&gt;&lt;span class="s"&gt;"animatedHeading"&lt;/span&gt;
        &lt;span class="na"&gt;data-lax-scale=&lt;/span&gt;&lt;span class="s"&gt;"0 1.9, 76 1"&lt;/span&gt; &lt;span class="na"&gt;data-lax-translate-y=&lt;/span&gt;&lt;span class="s"&gt;"0 32, 76 0"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            Awesome Scroll Animated Heading
    &lt;span class="nt"&gt;&amp;lt;/span&amp;gt;&lt;/span&gt;

    &lt;span class="nt"&gt;&amp;lt;v-tabs&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"tabs-container"&lt;/span&gt; &lt;span class="na"&gt;ref=&lt;/span&gt;&lt;span class="s"&gt;"animatedTabs"&lt;/span&gt; 
        &lt;span class="na"&gt;data-lax-translate-y=&lt;/span&gt;&lt;span class="s"&gt;"0 108, 76 0"&lt;/span&gt;
        &lt;span class="na"&gt;v-model=&lt;/span&gt;&lt;span class="s"&gt;"currentActiveTab"&lt;/span&gt; &lt;span class="err"&gt;@&lt;/span&gt;&lt;span class="na"&gt;change=&lt;/span&gt;&lt;span class="s"&gt;"updateActiveTab"&lt;/span&gt;
        &lt;span class="na"&gt;fixed-tabs&lt;/span&gt; &lt;span class="na"&gt;color=&lt;/span&gt;&lt;span class="s"&gt;"primary"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;v-tab&lt;/span&gt; &lt;span class="na"&gt;:ripple=&lt;/span&gt;&lt;span class="s"&gt;"false"&lt;/span&gt; &lt;span class="na"&gt;to=&lt;/span&gt;&lt;span class="s"&gt;"/"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                Tab 1
            &lt;span class="nt"&gt;&amp;lt;/v-tab&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;v-tab&lt;/span&gt; &lt;span class="na"&gt;:ripple=&lt;/span&gt;&lt;span class="s"&gt;"false"&lt;/span&gt; &lt;span class="na"&gt;to=&lt;/span&gt;&lt;span class="s"&gt;"/"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                Tab 2
            &lt;span class="nt"&gt;&amp;lt;/v-tab&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;v-tab&lt;/span&gt; &lt;span class="na"&gt;:ripple=&lt;/span&gt;&lt;span class="s"&gt;"false"&lt;/span&gt; &lt;span class="na"&gt;to=&lt;/span&gt;&lt;span class="s"&gt;"/"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
                Tab 3
            &lt;span class="nt"&gt;&amp;lt;/v-tab&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/v-tabs&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/template&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;Add &lt;code&gt;mounted&lt;/code&gt; and &lt;code&gt;beforeDestroy&lt;/code&gt; hooks in the component&lt;br&gt;
&lt;/p&gt;

&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;mounted&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$lax&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;addElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;animatedHeading&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$lax&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;addElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;animatedTabs&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;
&lt;span class="na"&gt;beforeDestroy&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$lax&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;addElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;animatedHeading&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;$lax&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;addElement&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;animatedTabs&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;},&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;



&lt;p&gt;The mounted hook adds our elements to lax which will animate them on scroll and the beforeDestroy hook removes them. now when your component renders, it will be animated on scroll.  &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The &lt;code&gt;v-tabs&lt;/code&gt; and &lt;code&gt;v-tab&lt;/code&gt; are vuetify components, and have nothing to do with lax, they are the ones I was using.  &lt;/p&gt;
&lt;/blockquote&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you're wondering what I was building, here's a sneak peak.&lt;br&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NSg_Q6oy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ba493uffp58ehv5h5un4.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NSg_Q6oy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_66%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/ba493uffp58ehv5h5un4.gif" alt="Scroll Animated Header with Tab"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vue</category>
    </item>
  </channel>
</rss>
