Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/react-core/src/remote-hook-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ function HookExecutor({

// Update state with the result
useEffect(() => {
updateState(id, { hookResult });
// always set loading to false when we have a result
updateState(id, { loading: false, hookResult });
}, [hookResult, id, updateState]);

return null;
Expand Down
1 change: 0 additions & 1 deletion packages/react-core/src/use-remote-hook.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ export const useRemoteHook = <T>({

// Only update if component is still mounted
if (isMounted) {
updateState(id, { loading: false, error: null });
updateArgs(id, args); // Set args before registering hook
registerHook(id, hookFunction);
}
Expand Down