You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Create a custom modifier using a composable modifier factory is now recommended, however it is still failing "Avoid Modifier extension factory functions"
#130
Open
YingChen0605 opened this issue
Aug 5, 2024
· 3 comments
Note: In previous versions of Compose, we recommended against this approach and suggested using composed {} instead via a lint rule. Now that composed {} is not recommended, the lint rule has been removed.
To Reproduce
Steps to reproduce the behavior:
Adding a new Composable:
@Composable
private fun Modifier.modify(viewModel: xxViewModel) = this then Modifier.viewable(onView = viewModel.onView)
.margin(margin = viewModel.margin)
Expected behavior
It should not be flagged as a violation.
Screenshots
Environment
com.twitter.compose.rules.detekt of 0.0.26
The text was updated successfully, but these errors were encountered:
Describe the bug
https://twitter.github.io/compose-rules/rules/#avoid-modifier-extension-factory-functions is no longer true now. Refer to the official documentation:
To Reproduce
Steps to reproduce the behavior:
Adding a new Composable:
Expected behavior
It should not be flagged as a violation.
Screenshots
Environment
com.twitter.compose.rules.detekt of 0.0.26
The text was updated successfully, but these errors were encountered: