Skip to content

Commit 0befd3e

Browse files
committed
Add comment to useEffect
1 parent 8835a04 commit 0befd3e

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

packages/connect-react/src/hooks/form-context.tsx

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,9 @@ export const FormContextProvider = <T extends ConfigurableProps>({
255255
};
256256

257257
useEffect(() => {
258+
// Initialize queryDisabledIdx on load so that we don't force users
259+
// to reconfigure a prop they've already configured whenever the page
260+
// or component is reloaded
258261
updateConfiguredPropsQueryDisabledIdx(_configuredProps)
259262
}, [
260263
_configuredProps,

0 commit comments

Comments
 (0)