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

Update MutableStateParameter to catch Mutable(Int,Float,etc)State #425

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

alexjlockwood
Copy link

@alexjlockwood alexjlockwood commented Feb 1, 2025

MutableStateParameter catches MutableState right now but not things like MutableIntState or MutableFloatState.

This PR fixes the check so that something like the below example is flagged as an error:

@Composable
fun MyFunction(mutableState: MutableIntState) {}

(Disclaimer: I'm not a regex expert... would appreciate if you could double check I got it right because I don't have an easy way to test right now :D)

…ong)State

I didn't have time to test this (sorry) but I wanted to make this quick PR anyways since it seemed the easiest way to flag this issue.

Feel free to push any updates and merge if you agree that we should also be catching these relatively new mutable state classes as well.

(Disclaimer: I'm not a regex expert... which is why I prefixed this description with the fact that I didn't test this haha)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant