Skip to content

Commit b09b54d

Browse files
committed
Fix links to point right section
1 parent b058781 commit b09b54d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/content/10/es/part10d.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -718,7 +718,7 @@ El segundo paso se repite hasta que el usuario se cansa de desplazarse o se exce
718718

719719
Echemos un vistazo a cómo funciona esto en la práctica utilizando el hook <em>useQuery</em> del cliente Apollo. Apollo Client tiene una excelente [documentación](https://www.apollographql.com/docs/react/data/pagination/#cursor-based) sobre la implementación de la paginación basada en cursor. Implementemos el desplazamiento infinito para la lista de repositorios revisados ​​como ejemplo.
720720

721-
Primero, necesitamos saber cuándo el usuario ha llegado al final de la lista. Afortunadamente, el componente <em>FlatList</em> tiene un prop [onEndReached](https://reactnative.dev/docs/flatlist#onendreached), que llamará a la función proporcionada una vez que el usuario se haya desplazado hasta el último elemento de la lista. Puede cambiar la anticipación con la que se llama a la devolución de llamada <em>onEndReach</em> usando el prop [onEndReachedThreshold](https://reactnative.dev/docs/flatlist#onendreachedthreshold). Modifique el componente <em> FlatList </em> del componente <em>RepositoryList</em> para que llame a una función una vez que se alcance el final de la lista:
721+
Primero, necesitamos saber cuándo el usuario ha llegado al final de la lista. Afortunadamente, el componente <em>FlatList</em> tiene un prop [onEndReached](https://reactnative.dev/docs/virtualizedlist#onendreached), que llamará a la función proporcionada una vez que el usuario se haya desplazado hasta el último elemento de la lista. Puede cambiar la anticipación con la que se llama a la devolución de llamada <em>onEndReach</em> usando el prop [onEndReachedThreshold](https://reactnative.dev/docs/virtualizedlist#onendreachedthreshold). Modifique el componente <em> FlatList </em> del componente <em>RepositoryList</em> para que llame a una función una vez que se alcance el final de la lista:
722722

723723
```javascript
724724
export const RepositoryListContainer = ({

src/content/10/zh/part10d.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -833,8 +833,8 @@ export class RepositoryListContainer extends React.Component {
833833
<!-- Let's have a look at how this works in practice using the Apollo Client's <em>useQuery</em> hook. Apollo Client has a great [documentation](https://www.apollographql.com/docs/react/pagination/cursor-based/) on implementing the cursor-based pagination. Let's implement infinite scrolling for the reviewed repositories list as an example.-->
834834
让我们来看看在实践中如何使用Apollo客户端的<em>useQuery</em>钩。Apollo客户端在实现基于光标的分页方面有一个很好的[文档](https://www.apollographql.com/docs/react/pagination/cursor-based/)。让我们以审查过的仓库列表为例,实现无限滚动。
835835

836-
<!-- First, we need to know when the user has reached the end of the list. Luckily, the <em>FlatList</em> component has a prop [onEndReached](https://reactnative.dev/docs/flatlist#onendreached), which will call the provided function once the user has scrolled to the last item on the list. You can change how early the <em>onEndReach</em> callback is called using the [onEndReachedThreshold](https://reactnative.dev/docs/flatlist#onendreachedthreshold) prop. Alter the <em>RepositoryList</em> component's <em>FlatList</em> component so that it calls a function once the end of the list is reached:-->
837-
首先,我们需要知道用户何时到达了列表的末尾。幸运的是,<em>FlatList</em>组件有一个prop[onEndReached](https://reactnative.dev/docs/flatlist#onendreached),一旦用户滚动到列表的最后一项,它将调用所提供的函数。你可以使用[onEndReachedThreshold](https://reactnative.dev/docs/flatlist#onendreachedthreshold)这个prop来改变<em>onEndReach</em>回调的早期调用。改变<em>RepositoryList</em>组件的<em>FlatList</em>组件,使其在达到列表的末端时调用一个函数。
836+
<!-- First, we need to know when the user has reached the end of the list. Luckily, the <em>FlatList</em> component has a prop [onEndReached](https://reactnative.dev/docs/virtualizedlist#onendreached), which will call the provided function once the user has scrolled to the last item on the list. You can change how early the <em>onEndReach</em> callback is called using the [onEndReachedThreshold](https://reactnative.dev/docs/virtualizedlist#onendreachedthreshold) prop. Alter the <em>RepositoryList</em> component's <em>FlatList</em> component so that it calls a function once the end of the list is reached:-->
837+
首先,我们需要知道用户何时到达了列表的末尾。幸运的是,<em>FlatList</em>组件有一个prop[onEndReached](https://reactnative.dev/docs/virtualizedlist#onendreached),一旦用户滚动到列表的最后一项,它将调用所提供的函数。你可以使用[onEndReachedThreshold](https://reactnative.dev/docs/virtualizedlist#onendreachedthreshold)这个prop来改变<em>onEndReach</em>回调的早期调用。改变<em>RepositoryList</em>组件的<em>FlatList</em>组件,使其在达到列表的末端时调用一个函数。
838838

839839
```javascript
840840
export const RepositoryListContainer = ({

0 commit comments

Comments
 (0)