FIX use early return to VisuallyHidden
Before
After
What I did
- Early-return was used to improve the readability of the if/else syntax.
- The stability was improved by eliminating the possibility of reallocation of the let using const.
✅ Pull Request Checklist:
- [ ] Included link to corresponding React Spectrum GitHub Issue.
- [ ] Added/updated unit tests and storybook for this change (for new code or code which already has tests).
- [ ] Filled out test instructions.
- [ ] Updated documentation (if it already exists for this component).
- [ ] Looked at the Accessibility Practices for this feature - Aria Practices
📝 Test Instructions:
🧢 Your Project: