facebook / facebook/relay

Modern: isLoading() is always true in PaginationContainer render method after loadMore()

Open
#1,973 14 comments 17 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
19k
Forks
1.9k
PR merge metrics
No merged PRs in 30d

Description

I was looking for a way to display a loading indicator in a PaginationContainer after calling `loadMore()` and I thought `this.props.relay.isLoading()` might do the trick. However, I see that the PaginationContainer's `render()` method is called only once after the network request (which I guess is expected), but `isLoading()` is always `true`. This seems like a bug since presumably the network request has completed prior to the refresh and therefore `isLoading()` should return `false`.

As an aside, this still leaves me with the question of how to display a loading indicator during paging in additional data via `loadMore()`.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.