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

Add Receiver Properties to Each Client for Receiver Interfaces #139

Merged
merged 1 commit into from
Nov 30, 2024

Conversation

ogaclejapan
Copy link
Contributor

We decided to expose corresponding receiver properties to make each Key implementation in soil.query usable as a simplified API wrapper. This is useful when calling from non-Compose parts of the application.

suspend fun doSomething() {
  val key = ExampleQueryKey(..)
  val swrClient = ...
  val data = with(key) { swrClient.queryReceiver.fetch() }
}

We decided to expose corresponding receiver properties to make each Key implementation in soil.query usable as a
simplified API wrapper. This is useful when calling from non-Compose parts of the application.

```
suspend fun doSomething() {
  val key = ExampleQueryKey(..)
  val swrClient = ...
  val data = with(key) { swrClient.queryReceiver.fetch() }
}
```
@ogaclejapan ogaclejapan added the enhancement New feature or request label Nov 30, 2024
@ogaclejapan ogaclejapan merged commit 0ab04ee into main Nov 30, 2024
3 checks passed
@ogaclejapan ogaclejapan deleted the receiver-property branch November 30, 2024 09:43
@github-actions github-actions bot mentioned this pull request Dec 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant