Solutionunvalidated
You want the useEffect only to run when a different pet is used — rather than whenever the current pet undergoes a stat change. Tension: having [pet] in the dependency array is the problem. Outcome: an id (or a name) that doesn't change per pet would be the way to go - `[pet?.id]` or `[pet?.name]`.
2b66eede-9e9a-40a3-927b-7ce852866453
You want the useEffect only to run when a different pet is used — rather than whenever the current pet undergoes a stat change. Tension: having [pet] in the dependency array is the problem. Outcome: an id (or a name) that doesn't change per pet would be the way to go - [pet?.id] or [pet?.name].