# 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 |
