Skip to content

Commit

Permalink
Add plural fragment support to observeFragment() (#4862)
Browse files Browse the repository at this point in the history
Summary:
This PR adds plural fragment support to `observeFragment()` (and `waitForFragmentData()` which uses `observeFragment()` under the hood)

It should be noted that the Relay environment currently doesn't support subscribing to plural fragment updates, so the implementation is done by subscribing to each selector and merging the states. Since the current implementation doesn't do any batching of notifications that are made from each selector subscription, it can be somewhat inefficient if the consumer doesn't batch on their own.

Pull Request resolved: #4862

Reviewed By: tyao1

Differential Revision: D67148721

Pulled By: captbaritone

fbshipit-source-id: 1c63178c78ece3588ac86b8814d9b8fbf2ce057b
  • Loading branch information
XiNiHa authored and facebook-github-bot committed Jan 6, 2025
1 parent d64b0e9 commit 9ce4817
Show file tree
Hide file tree
Showing 17 changed files with 1,566 additions and 23 deletions.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 9ce4817

Please sign in to comment.