# Migrate from zeego

> Switch from zeego's DropdownMenu and ContextMenu to Patine UI: one DropdownMenu with an actions array, icons, subtitles, destructive, disabled and checked items, and a long-press context menu. Pure JavaScript: runs in Expo Go.

# Migrate from `zeego`

`zeego` composes a menu from parts (`Root`, `Trigger`, `Content`, `Item`, `ItemTitle`…) and shows native menus, so it needs a development build. [`DropdownMenu`](../../components/dropdown-menu) takes one `actions` array and is pure JavaScript, so it runs in Expo Go too.

```diff
- import * as DropdownMenu from 'zeego/dropdown-menu';
+ import { DropdownMenu } from 'patine-ui';

- <DropdownMenu.Root>
-   <DropdownMenu.Trigger>
-     <MoreIcon />
-   </DropdownMenu.Trigger>
-   <DropdownMenu.Content>
-     <DropdownMenu.Item key="edit" onSelect={edit}>
-       <DropdownMenu.ItemTitle>Edit</DropdownMenu.ItemTitle>
-     </DropdownMenu.Item>
-     <DropdownMenu.Item key="delete" destructive onSelect={remove}>
-       <DropdownMenu.ItemTitle>Delete</DropdownMenu.ItemTitle>
-     </DropdownMenu.Item>
-   </DropdownMenu.Content>
- </DropdownMenu.Root>
+ <DropdownMenu
+   accessibilityLabel="More options"
+   actions={[
+     { label: 'Edit', onPress: edit },
+     { label: 'Delete', destructive: true, onPress: remove },
+   ]}
+ >
+   <MoreIcon />
+ </DropdownMenu>
```

| zeego | Patine UI |
| --- | --- |
| `DropdownMenu.Root` + `Trigger` | `DropdownMenu`, with the trigger as `children` |
| `ContextMenu.Root` | `DropdownMenu openOnLongPress` |
| `Item` + `onSelect` | an action with `onPress` |
| `ItemTitle` / `ItemSubtitle` | `label` / `description` |
| `ItemIcon` / `ItemImage` | `icon`: any node |
| `destructive` / `disabled` on `Item` | `destructive` / `disabled` |
| `CheckboxItem value="on"` + `ItemIndicator` | `selected: true` (a ✓); toggle it in `onPress` |
| `Label` | `title` |
| `Group` / `Separator` / `Sub` | — |
| `Root onOpenChange` | `onOpenChange` |
| `Content align` | `align` |
| `ContextMenu.Preview` | — |

See [all migration guides](./index.mdx) for other libraries.
