Saving the size when the state of the component changes

It would be nice to be able to see the same size of a component after a state change. For example, I have a special Textarea component. After changing its state, I see that its size has changed.