Skip to content

Selection causes endless loop  #260

Description

@yunusyuksel

Using selection API causes the child components stuck in endless loop

<Selection> <Select enabled> <mesh position={[5, 5, 0]}> <boxGeometry /> <meshStandardMaterial color="orange" /> </mesh> </Select> </Selection>

Activity

  1. BabakMot commented on Jan 31, 2025

    @BabakMot

    Any updates on this? I'm using the latest rc (3.0.0-rc.2)
    As long as Select enabled is true it causes endless updates.

  2. tsherif commented on Jun 3, 2025

    @tsherif

    I'm not an expert in React or this library, but the bug seems to be in this code. api.select calls a setState which causes the component to re-render calling the cleanup for the effect, which remove the object from the selection, and it's added back in when the effect reruns, etc.

  3. guru-florida commented on Jun 30, 2025

    @guru-florida

    I am using 3.0.4 and it is still causing an endless update loop in react.

  4. ischntsmn commented on Mar 3, 2026

    @ischntsmn

    is this still an issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions