You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If the device passed to addVoiceFocus is an empty string, the function still calls:
constvf=awaittransformer?.createTransformDevice(device);if(vf){logger.info('Created a new Amazon Voice Focus transform device.');setVoiceFocusDevice(vf);returnvf;}
This causes vf to be created and subsequently setVoiceFocusDevice(vf) is invoked, which leads to a new reference for addVoiceFocus on every render.
If addVoiceFocus is called inside an effect and included as a dependency, this results in an infinite rerender.
2025-10-20.18-08-47.mov
Recommendation:
Add an early exit: don’t call transform if device is empty.
Memoize addVoiceFocus so its reference remains stable when device doesn’t change.
What happened and what did you expect to happen?
If the device passed to
addVoiceFocusis an empty string, the function still calls:This causes
vfto be created and subsequentlysetVoiceFocusDevice(vf)is invoked, which leads to a new reference foraddVoiceFocuson every render.If addVoiceFocus is called inside an effect and included as a dependency, this results in an infinite rerender.
2025-10-20.18-08-47.mov
Recommendation:
Have you reviewed our existing documentation?
Reproduction steps
Steps to Reproduce:
addVoiceFocuswith an empty string as the device.createTransformDeviceis invoked.addVoiceFocusin a React effect dependency array.Amazon Chime SDK React Components Library version
^3.11.0
What browsers are you seeing the problem on?
Chrome dev, comet
Browser version
Version 143.0.7475.7
Device Information
MacBook Pro; 14.1 (23B74)
Meeting and Attendee ID Information.
No response
Browser console logs
ConsoleLogger.js:79 2025-10-20T10:23:57.861Z [INFO] ChimeSDKReactComponent - Created a new Amazon Voice Focus transform device.
ConsoleLogger.js:79 2025-10-20T10:23:58.083Z [INFO] ChimeSDKReactComponent - Created a new Amazon Voice Focus transform device.
ConsoleLogger.js:79 2025-10-20T10:23:58.339Z [INFO] ChimeSDKReactComponent - Created a new Amazon Voice Focus transform device.
ConsoleLogger.js:79 2025-10-20T10:23:58.879Z [INFO] ChimeSDKReactComponent - Created a new Amazon Voice Focus transform device.
ConsoleLogger.js:79 2025-10-20T10:23:59.029Z [INFO] ChimeSDKReactComponent - Created a new Amazon Voice Focus transform device.
Add any other context about the problem here.
No response