Example: Use a Built-in State Manager
This example is intended to show the simplest possible use of a built-in state manager. The important concepts are the state manager lifecycle, and understanding how to access response values.
In practice, if your usage pattern is this simple, use the wire service instead. To clearly illustrate essential concepts here, we've over-simplified the example code in this topic. See Best Practices for State Manager Design for more guidance on how built-in state managers are intended to be used.