I put a little example of my code in React, I need to make a lot of calculations, is there a optimal way to do that? I want the values change as the values in the state cha