react-typical icon indicating copy to clipboard operation
react-typical copied to clipboard

Really fast effect after scroll up/down

Open lps83 opened this issue 4 years ago • 7 comments

Same effect x100 on a one page

lps83 avatar Apr 06 '20 01:04 lps83

I have the same trouble. Can someone help me?

adrianodesenv avatar Apr 17 '20 03:04 adrianodesenv

I fixed it ! I made my own lib ^^

lps83 avatar Apr 18 '20 19:04 lps83

Same here, if I use onScroll and setState

gabrielpetersson avatar May 29 '20 11:05 gabrielpetersson

As long as you do not setState in a parent or in the same component it seems to work

gabrielpetersson avatar Jun 02 '20 18:06 gabrielpetersson

@lps83 Can you share it? :D

LamelDev avatar Jun 10 '20 08:06 LamelDev

I solved this problem by using React.memo, here is a sample code if anyone need

const TypingAnimation =  React.memo(()=>{
  return <Typical
  loop={Infinity}
  wrapper="p"
  steps={
    [
      'Hello',
      1200,
      'World',
      1200,
     
    ]
  }
 />
},(props,prevProp)=> true ); // this line prevent re rendering

whoami-shubham avatar Jul 31 '20 20:07 whoami-shubham

Thanks @whoami-shubham it made the trick!

JohnBerd avatar Oct 24 '20 12:10 JohnBerd