Skip to content

Commit f2f4a32

Browse files
authored
Fix: App component UseEffect infinite loop (#1199)
### Motivation and Context <!-- Thank you for your contribution to the chat-copilot repo! Please help reviewers and future users, providing the following information: 1. Why is this change required? 2. What problem does it solve? 3. What scenario does it contribute to? 4. If it fixes an open issue, please link to the issue here. --> The useEffect hook in the App component is causing an infinite rendering loop. Remove the dependencies that are causing the loop. ### Description <!-- Describe your changes, the overall approach, the underlying design. These notes will help understanding how your code works. Thanks! --> ### Contribution Checklist <!-- Before submitting this PR, please make sure: --> - [ ] The code builds clean without any errors or warnings - [ ] The PR follows the [Contribution Guidelines](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md) and the [pre-submission formatting script](https://github.com/microsoft/chat-copilot/blob/main/CONTRIBUTING.md#development-scripts) raises no violations - [ ] All unit tests pass, and I have added new tests where possible - [ ] I didn't break anyone 😄
1 parent 7b27658 commit f2f4a32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

webapp/src/App.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -122,8 +122,8 @@ const App = () => {
122122
}
123123
}),
124124
]);
125-
}
126-
}, [instance, isAuthenticated, appState, isMaintenance, handleAppStateChange, dispatch, chat, file]);
125+
} // eslint-disable-next-line react-hooks/exhaustive-deps
126+
}, [instance, isAuthenticated, appState, isMaintenance]);
127127

128128
const theme = features[FeatureKeys.DarkMode].enabled ? semanticKernelDarkTheme : semanticKernelLightTheme;
129129

0 commit comments

Comments
 (0)