1. It is a common requirement to refresh on the APP to achieve the last update time. Here is the PullToRefresh
code to achieve this effect.
2. The realization idea is: remember the current time every time you refresh.
3. The code configuration is a configuration item of PullToRefresh:
4.
pullToRefresh={
<PullToRefresh
refreshing={
refreshing}
onRefresh={
this.onRefresh}
indicator={
{
activate: `上次更新${
lastUpdateTime}` }}
/>
}
The specific code will not be posted, it is very simple.