Skip to content

FCE-2509, FCE-2676: startCamera from useCamera is causing useEffect rerenders#465

Merged
MiloszFilimowski merged 2 commits intomainfrom
mfilimowski/FCE-2676-start-camera
Feb 5, 2026
Merged

FCE-2509, FCE-2676: startCamera from useCamera is causing useEffect rerenders#465
MiloszFilimowski merged 2 commits intomainfrom
mfilimowski/FCE-2676-start-camera

Conversation

@MiloszFilimowski
Copy link
Collaborator

Description

  • getLogger was returning a new reference on every render, which made every hook that used it unstable.

Motivation and Context

  • logger was unstable

Documentation impact

  • Documentation update required
  • Documentation updated in another PR
  • No documentation update required

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to
    not work as expected)

@linear
Copy link

linear bot commented Feb 2, 2026

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Stabilizes the logger instance used throughout the React client provider to prevent downstream hooks (e.g., camera start logic) from re-running effects due to changing function/object references.

Changes:

  • Memoize getLogger(...) inside FishjamProvider so it does not create a new reference on every render.
  • Keep logger stable across renders unless debug changes.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Member

@czerwiukk czerwiukk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch

@MiloszFilimowski MiloszFilimowski enabled auto-merge (squash) February 5, 2026 09:57
@MiloszFilimowski MiloszFilimowski merged commit 154d311 into main Feb 5, 2026
2 checks passed
@MiloszFilimowski MiloszFilimowski deleted the mfilimowski/FCE-2676-start-camera branch February 5, 2026 10:02
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.

2 participants

Comments