# Creators

| Name                            | Type                | Args                               | Return Type                                                                 |
| ------------------------------- | ------------------- | ---------------------------------- | --------------------------------------------------------------------------- |
| [createNote](#createnote)       | \<R = any, C = any> | routes, nameOptions                | Notes\<R, C>                                                                |
| [createRoot](#createroot)       | \<R = any, C = any> | routes, { key, nearby, routeName } | [Unit](https://routeshub.gitbook.io/docs/interfaces#unit)\<R & C>           |
| [createFeature](#createfeature) | \<R = any, C = any> | routes, { key, nearby, routeName } | [Connector](https://routeshub.gitbook.io/docs/interfaces#connector)\<R & C> |

## [createNote](#createnote)

Creates a route note unit. It uses internally by [createRoot](#createroot) / [createFeature](#createfeature)

#### Generic Type:

```typescript
<R = any, C = any>
```

#### Args:

```typescript
(
  routes: Route[],
  nameOptions: DefaultNameOptions = {}
)
```

#### �Return Type:

```typescript
Notes<R, C>
```

## [createRoot](#createroot)

Creates the root unit and invokes only once to initialize a hub.&#x20;

#### Generic Type:

```typescript
: <R = any, C = any>
```

#### Args:

```typescript
(
  routes: Route[],
  { key, nearby, routeName }: Partial<CreatorOptionArgs> = {}
)
```

#### �Return Type:

```typescript
: Unit<R, C>
```

#### Usage example:

{% code title="" %}

```typescript
export const appUnit: Unit<AppNotes, AppChildNotes> = 
    createRoot<AppNotes, AppChildNotes>(routes, { key: KEY });

```

{% endcode %}

## [createFeature](#createfeature)

Invokes once for each feature (eager/lazy) module.�

#### �Generic Type:

```typescript
: <R = any, C = any>
```

#### Args:

```typescript
(
  routes: Route[],
  { key, nearby, routeName }: Partial<CreatorOptionArgs> = {}
)
```

#### Return Type:

```typescript
: Connector<R, C>
```

#### Usage example:

{% code title="" %}

```typescript
export const aboutConnector: Unit<AboutNotes> = 
    createFeature<AboutNotes>(routes, { key: ABOUT_HUB_KEY});
```

{% endcode %}
