snettah / react-ztext

Ztextjs implementation in React
48 stars 2 forks source link

No reactive for this component. #4

Open 1216892614 opened 5 days ago

1216892614 commented 5 days ago
<Ztext
  depth="1rem"
  direction="both"
  event="pointer"
  eventRotation="30deg"
  eventDirection="default"
  fade={false}
  layers={10}
  perspective="500px"
  style={{
    fontSize: "4rem",
  }}
>
  <span role="img" aria-label="emoji">
    {text}
  </span>
</Ztext>

I just use lib like this. But when text change, dom still display text before change.

snettah commented 3 days ago

remount your component, maybe use the key prop