Skip to content

Commit

Permalink
Add upgrade guide for transitioning from Remix Utils v7 to v8
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiodxa committed Dec 4, 2024
1 parent b2201d8 commit cebc4a8
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions docs/v7-to-v8.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
title: Upgrade from v7 to v8
---

# Upgrade from Remix Utils v7

> [!TIP]
> This guide only matters if you're using Remix and you want to upgrade from Remix Utils v7 to v8.
The Remix Utils v8 package is not compatible anymore with Remix v1 or v2, instead it requires you to use React Router v7, and some utils may require you to use the framework mode of RRv7.

If you're on the process of migrating from Remix to RRv7, upgrade also Remix Utils to v8.

Then remove any `@remix-run/*` package you have. After that you should be good to go.

Note the following breaking changes:

## namedAction

If you're using namedAction util, note that it has dropped support for receiving a URL, URLSearchParams or Request objects, and now only accepts a FormData.

It also only support the field `intent` for the action name, if you were using `?/action-name` or `action` or `_action`, that won't work anymore.

## wait

If you were using the `wait` timer util, that was removed, instead use `setTimeout` from `node:timers/promise`.

```diff
- import { wait } from 'remix-utils/timers"
+ import { setTimeout } from 'node:timers/promise'
```

And then in the usage:

```diff
- await wait(1000, { signal })
+ await setTimeout(1000, void 0, { signal })
```

0 comments on commit cebc4a8

Please sign in to comment.