# ConanFlow

The class ConanFlow contains the following methods:

### ***on***

this method allows connecting a Conan state with a React component, using a mapper function to describe the mapping

| Input      |                                                                                                                         |
| ---------- | ----------------------------------------------------------------------------------------------------------------------- |
| statusName | <p><strong>Type:</strong>  <code>STATUS </code><em><code>required</code></em></p><p>the STATUS we want to hook into</p> |

| Returns                            |                                                                                                             |
| ---------------------------------- | ----------------------------------------------------------------------------------------------------------- |
| StatusDef\<USER\_STATUSES, STATUS> | The StatusDef object allows to add reactions, invoke transitions, steps and obtain the last ConanState Data |

### ***start***

this method allows connecting a Conan state with a React component, using a mapper function to describe the mapping

| Input         |                                                                                                                                                             |
| ------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------- |
| initialStatus | <p><strong>Type:</strong>  <code>StatusLike\<USER\_STATUSES> </code><em><code>optional</code></em></p><p>optional initial STATUS to start the flow with</p> |

| Returns   |                |
| --------- | -------------- |
| ConanFlow | this ConanFlow |

###

### *toStateAll*

this method creates a ConanState with the state of each status

| Returns             |                                          |
| ------------------- | ---------------------------------------- |
| ConanState\<Status> | contains the states for all the statuses |

### *toState*

this method creates a ConanState with the state of the status passed as input

| Input  |                                                                                                                                         |
| ------ | --------------------------------------------------------------------------------------------------------------------------------------- |
| status | <p><strong>Type:</strong>  <code>STATUS </code><em><code>required</code></em></p><p>the STATUS we want to obtain the ConanState for</p> |

| Returns                              |                                  |
| ------------------------------------ | -------------------------------- |
| ConanState\<USER\_STATUSES\[STATUS]> | ConanState for the status passed |


---

# 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://docs.conanjs.io/api/main-classes/conanflow.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.
