|
|
|
|
|
by mrtksn
3039 days ago
|
|
The pattern is to handle form fields locally in the browser as part of the application state. Basically, the value of the input is tied to a "state engine" that acts as a single source of truth and when the user types in the input you'll update the state so that the rest of the application can know what's going on in the form without accessing the DOM. The state engine is a fancy word for a variable that has a special setter function so that the changes can be reflected globally. |
|