> **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.

# useSpawnConduit

React mutation hook for deploying a new conduit via the factory.

## Import

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

## Usage

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

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

  const handleSpawn = async () => {
    const result = await mutateAsync({
      factory: '0x...',
      name: 'My Conduit',
      symbol: 'COND',
      vehicle: '0x...',
      initialExpectedSupply: 1000000000000000000n,
      transferEnabled: true,
      accessControl: '0x...',
      feeManager: '0x...',
      accountList: '0x...',
      ownerRegistry: '0x...',
      account: '0x...',
    })

    console.log(result.conduitAddress)
  }

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

## Returns

```ts
UseMutationResult<SpawnConduitReturnType, Error, SpawnConduitParameters & { account: Address }>
```

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