Giter Site home page Giter Site logo

Comments (7)

abused avatar abused commented on June 14, 2024

I Am also having this issue, whenever rerendering occurs (in my case selecting an item), the animation is rerun.
4luuSG5 - Imgur

from react-anime.

Kyliathy avatar Kyliathy commented on June 14, 2024

Same here. Using functional components & useState.

I really liked the simplicity of defining animations. Anyway, until a solution is found, I switched to react-spring.

from react-anime.

andreasonny83 avatar andreasonny83 commented on June 14, 2024

Same here

from react-anime.

clearink avatar clearink commented on June 14, 2024

单击按钮将再次显示动画,尽管标记没有更改:

ReactAnime

 从“ react” 导入React  {  useState  }  ; 进口动漫从“反应-动漫” ; 
   

出口 默认 函数 应用() { 
  const的 列表 =  [ 0  1  2  3  4  5 ] ; 
  const  [  set ]  =  useState (); 
  返回 
    < 动画 规模= { [ 0  1 ] } > 
      { 列表。映射(我 =>  
        <按钮 = { i }  onClick = { () =>  设置(i } > 
          { i } 
        < / button > 
      ))} 
    < / 动漫> 
  ; 
}

Codesandbox:https://codesandbox.io/s/react-anime-rerender-ttfbu

I think it's because the component's props have changed,Although they are both [0,1]

from react-anime.

Nantris avatar Nantris commented on June 14, 2024

I haven't found any way around this, or any circumstance that I can React-Anime due to this issue. It's a really elegant solution to integrating AnimeJS with React and I'd really like to use it. I'm not seeing how to work around this issue though. I even forked the library and spent the past few hours trying to remedy this.

@alaingalvan can you explain why this is, or what the correct implementation with React-Anime is?

from react-anime.

BryanAM avatar BryanAM commented on June 14, 2024

I second this, reach pushing functional components makes animations really hard when every update of the state triggers all animations over.

from react-anime.

HotPotatoC avatar HotPotatoC commented on June 14, 2024

I also have the same problem.

@alaingalvan just wondering will there be a fix to this issue?

from react-anime.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.