Imagine a scenario where you want to limit your TextField’s input count to a certain number. For example, you are expecting user’s firstName to be 100 chars long(for better indexing and optimization on Database side), you have two choices, truncate input once user finished editing the field(use OnSubmit for that) or observe what’s being typed in TextField, keep a counter and once the counter reaches the limit, stop taking input. This is where the onChange observer can be helpful. You can observe input from the user via onChange and react to it. Another use-case could be to only allow certain character types to be typed into the field.
For our example, we will limit the user’s first name to 10 char counts and ask them for their age(Numeric Chars).