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

react-native-a11y/has-valid-accessibility-state crashes when destructuring within prop. #146

Open
jaworek opened this issue Sep 27, 2022 · 0 comments

Comments

@jaworek
Copy link

jaworek commented Sep 27, 2022

When accessibilityState prop is defined as an inline object with destructured object within it, this rule crashes.

accessibilityState={{ ...accessibilityState, disabled }}

Here's the error message:
photo_2022-09-27_12-09-56

I was able to find a workaround by defining it first as a separate variable and then passing it to prop.

const newAccessibilityState = { ...accessibilityState, disabled };

...

accessibilityState={newAccessibilityState}
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

No branches or pull requests

1 participant