Thanks to visit codestin.com
Credit goes to github.com

Skip to content

refactor(orb-demo): derive ORBS array without mutation#51

Open
alamenai wants to merge 1 commit intoelevenlabs:mainfrom
alamenai:ala/orb-demo-refactoring
Open

refactor(orb-demo): derive ORBS array without mutation#51
alamenai wants to merge 1 commit intoelevenlabs:mainfrom
alamenai:ala/orb-demo-refactoring

Conversation

@alamenai
Copy link
Contributor

What

The OrbDemo component mutates module-level variable ORBS.

  1. ORBS is declared at module scope with let
  2. Every render mutates this shared variable.
  3. If small=true renders once, ORBS is permanently reduced to one element.
  4. This affects all future renders and all component instances.
  5. It Breaks React's expectation of pure render functions.

Alternatively, We can use useMemo but we don't have a large array.

@vercel
Copy link
Contributor

vercel bot commented Dec 20, 2025

@alamenai is attempting to deploy a commit to the ElevenLabs Team on Vercel.

A member of the Team first needs to authorize it.

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

Comments