compose-lints icon indicating copy to clipboard operation
compose-lints copied to clipboard

`ComposeUnstableReceiver` only for non-Unit returning functions

Open blipinsk opened this issue 9 months ago • 1 comments

This PR relates to this issue: https://github.com/slackhq/compose-lints/issues/467

A @Composable function can never be skippable if it returns non-Unit. Raising the lint violation in such case is misleading because there's nothing we can do about the receiver type that would make the function skippable.

Additionally, I added a suggestion (we might as well remove it if you don't like it) for docs, to clarify that Strong Skipping doesn't really work well with the rule (link).

blipinsk avatar Feb 25 '25 14:02 blipinsk

Thanks for the contribution! Before we can merge this, we need @blipinsk to sign the Salesforce Inc. Contributor License Agreement.

salesforce-cla[bot] avatar Feb 25 '25 14:02 salesforce-cla[bot]