# Where the action happens

When creating your FSM you need to be thinking about how state transitions will affect your application and how to apply those state transitions.

Essentially you need to wire the FSM into your application.

FSM2 has a number key tools you should look to when wiring a FSM into your app.

* [onEnter](/transitions/onenter.md)
* [onExit](/transitions/onexit.md)
* [sideEffects](/transitions/sideeffects.md)
* [stream](/tracking-state/stream-of-states.md)

Using the above tools allows your application to 'react' to state changes.

By placing handlers at any of the above connection points you can use state changes to trigger virtually anything.

Some examples might be:

* ui updates
* database updates
* fetch data
* trigger a route change
* send a text message


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://fsm2.onepub.dev/where-the-action-happens.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
