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
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -1309,7 +1309,7 @@
"react-router-dom": "^5.3.4",
"react-router-dom-v5-compat": "^6.12.0",
"react-shortcuts": "^2.1.0",
"react-use": "^15.3.8",
"react-use": "^17.6.0",
"react-virtualized": "^9.22.6",
"react-window": "^1.8.11",
"react-window-infinite-loader": "^1.0.9",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import {

import { i18n } from '@kbn/i18n';

import { isDeepEqual } from 'react-use/lib/util';
import isDeepEqual from 'fast-deep-equal/react';
Copy link
Copy Markdown
Contributor

@Dosant Dosant Jun 16, 2025

Choose a reason for hiding this comment

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

The internal location of that utility has changed, but I decided to use the underlying library directly instead of a re-export. https://github.com/streamich/react-use/blob/master/src/misc/isDeepEqual.ts

import { sortAndFilterConnectorConfiguration } from '../../utils/connector_configuration_utils';
import {
Connector,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@
import type { AsyncState } from 'react-use/lib/useAsyncFn';
import useAsyncFn from 'react-use/lib/useAsyncFn';
import useLatest from 'react-use/lib/useLatest';
import type { FnReturningPromise } from 'react-use/lib/util';
import type { FunctionReturningPromise } from 'react-use/lib/misc/types';

type NarrowAsyncState<TState extends AsyncState<unknown>> = Exclude<
TState,
{ error?: undefined; value?: undefined }
>;

export const useAsyncFunction = <T extends FnReturningPromise>(
export const useAsyncFunction = <T extends FunctionReturningPromise>(
asyncFunction: T,
initialState: AsyncState<Awaited<ReturnType<T>>> = { loading: true }
) => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* 2.0.
*/

import { isDeepEqual } from 'react-use/lib/util';
import isDeepEqual from 'fast-deep-equal/react';

import { Logger, SavedObjectsClientContract, SavedObjectsErrorHelpers } from '@kbn/core/server';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

import { kea, MakeLogicType } from 'kea';

import { isDeepEqual } from 'react-use/lib/util';
import isDeepEqual from 'fast-deep-equal/react';

import type { IngestPipelineParams } from '@kbn/search-connectors';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,9 @@
* 2.0.
*/

import isDeepEqual from 'fast-deep-equal/react';
import { kea, MakeLogicType } from 'kea';

import { isDeepEqual } from 'react-use/lib/util';

import { IngestPipelineParams } from '@kbn/search-connectors';

import { DEFAULT_PIPELINE_VALUES } from '../../../../../common/constants';
Expand Down
Loading