Jump to content
Search Community

TAAT

Members
  • Posts

    2
  • Joined

  • Last visited

Posts posted by TAAT

  1. 37 minutes ago, OSUblake said:

    Set the state yourself in your return function.

    
    setHighlightA(false);
    setHighlightB(false);
    setHighlightC(false);
    setHighlightD(false);

     

    And trying to animate a boolean is strange. It's converting them to strings. Something a little simpler.

     

    
    timeLineLength.to(animationData, 1, { onStart() { setHighlightA(true); } })
    timeLineLength.to(animationData, 1, { onStart() { setHighlightB(true); } })
    timeLineLength.to(animationData, 1, { onStart() { setHighlightC(true); } })
    timeLineLength.to(animationData, 1, { onStart() { setHighlightD(true); } })

     

    Thanks, I did try setting the Highlights manually and typecasting the boolean values, but didn't give the expected behavior. 

     

    I have realized that on updating the react-dom version, it does behave the way it is expected. I have raised an issue with React as well : https://github.com/facebook/react/issues/17112

     

    In case someone has some insights, please do let know. 

     

     

  2. I have a simple animation -

    1. Lines get highlighted one after the other on click on a button.

    2. Clicking on button again, while the animation is running, should de-highlight the lines to original state.

     

    However, on setting the timeline progress of animation to 0, all the values get reset, but the last one modified continues to remain in same state. 

     

    To reproduce, click the button, and after a couple lines have highlighted, click the button again. 

     

    Code Sandbox : https://codesandbox.io/s/inspiring-gates-poozb

    See the Pen by s (@s) on CodePen

×
×
  • Create New...