js-tosorted-immutable
✓Use toSorted() instead of sort() to avoid mutating arrays. Apply when sorting arrays that are React props, state, or otherwise shared/referenced elsewhere.
Installation
SKILL.md
.sort() mutates the array in place, which can cause bugs with React Use .toSorted() to create a new sorted array without state and props. mutation.
.toSorted() is available in all modern browsers (Chrome 110+, Safari 16+, Firefox 115+, Node.js 20+). For older environments, use spread operator:
Use toSorted() instead of sort() to avoid mutating arrays. Apply when sorting arrays that are React props, state, or otherwise shared/referenced elsewhere. Source: theorcdev/8bitcn-ui.
Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/theorcdev/8bitcn-ui --skill js-tosorted-immutable Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code or Cursor
Facts (cite-ready)
Stable fields and commands for AI/search citations.
- Install command
npx skills add https://github.com/theorcdev/8bitcn-ui --skill js-tosorted-immutable- Source
- theorcdev/8bitcn-ui
- Category
- *Creative Media
- Verified
- ✓
- First Seen
- 2026-02-01
- Updated
- 2026-02-18
Quick answers
What is js-tosorted-immutable?
Use toSorted() instead of sort() to avoid mutating arrays. Apply when sorting arrays that are React props, state, or otherwise shared/referenced elsewhere. Source: theorcdev/8bitcn-ui.
How do I install js-tosorted-immutable?
Open your terminal or command line tool (Terminal, iTerm, Windows Terminal, etc.) Copy and run this command: npx skills add https://github.com/theorcdev/8bitcn-ui --skill js-tosorted-immutable Once installed, the skill will be automatically configured in your AI coding environment and ready to use in Claude Code or Cursor
Where is the source repository?
https://github.com/theorcdev/8bitcn-ui
Details
- Category
- *Creative Media
- Source
- skills.sh
- First Seen
- 2026-02-01