Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve next/future/image Migration docs #39421

Merged
merged 3 commits into from Aug 10, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
50 changes: 9 additions & 41 deletions docs/api-reference/next/future/image.md
Expand Up @@ -43,19 +43,9 @@ Compared to `next/image`, the new `next/future/image` component has the followin

## Migration

Although `layout` is not available, you can migrate `next/image` to `next/future/image` using a few props. The following is a comparison of the two components:
Although `layout` is not available, you can migrate `next/image` to `next/future/image` using a few props. The following code snippets help you to understand the comparison between these two components:
styfle marked this conversation as resolved.
Show resolved Hide resolved

<table>
<thead>
<tr>
<th>next/image</th>
<th>next/future/image</th>
</tr>
</thead>
<tbody>

<tr>
<td>
#### before: `next/image`

```jsx
import Image from 'next/image'
Expand All @@ -66,8 +56,7 @@ function Page() {
}
```

</td>
<td>
#### after: `next/future/image`

```jsx
import Image from 'next/future/image'
Expand All @@ -79,11 +68,7 @@ function Page() {
}
```

</td>
</tr>

<tr>
<td>
#### before: `next/image`

```jsx
import Image from 'next/image'
Expand All @@ -94,8 +79,7 @@ function Page() {
}
```

</td>
<td>
#### after: `next/future/image`

```jsx
import Image from 'next/future/image'
Expand All @@ -107,11 +91,7 @@ function Page() {
}
```

</td>
</tr>

<tr>
<td>
#### before: `next/image`

```jsx
import Image from 'next/image'
Expand All @@ -122,8 +102,7 @@ function Page() {
}
```

</td>
<td>
#### after: `next/future/image`

```jsx
import Image from 'next/future/image'
Expand All @@ -134,11 +113,7 @@ function Page() {
}
```

</td>
</tr>

<tr>
<td>
#### before: `next/image`

```jsx
import Image from 'next/image'
Expand All @@ -149,8 +124,7 @@ function Page() {
}
```

</td>
<td>
#### after: `next/future/image`

```jsx
import Image from 'next/future/image'
Expand All @@ -161,12 +135,6 @@ function Page() {
}
```

</td>
</tr>

</tbody>
</table>

You can also use `className` instead of `style`.

## Required Props
Expand Down