> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://sdk.railnet.org/api/mcp` to find what you need.

# useSpawnMultiVehicle

React mutation hook for deploying a new MultiVehicle ecosystem via the factory.

## Import

```ts
import { useSpawnMultiVehicle } from '@railnetorg/railnet-sdk/react'
```

## Usage

```tsx
import { useSpawnMultiVehicle } from '@railnetorg/railnet-sdk/react'

function Spawn() {
  const { mutateAsync, isPending } = useSpawnMultiVehicle()

  const handleSpawn = async () => {
    const result = await mutateAsync({
      factory: '0x...',
      asset: '0x...',
      name: 'My MultiVehicle',
      symbol: 'MMV',
      accessControl: '0x...',
      queryRegistry: '0x...',
      account: '0x...',
    })

    console.log(result.contracts.multiVehicle)
  }

  return (
    <button disabled={isPending} onClick={handleSpawn}>
      Deploy MultiVehicle
    </button>
  )
}
```

## Returns

```ts
UseMutationResult<SpawnMultiVehicleReturnType, Error, SpawnMultiVehicleParameters & { account: Address }>
```

Mutation result. Call `mutate` or `mutateAsync` with [`spawnMultiVehicle`](/actions/spawnMultiVehicle) parameters.
