Skip to content

Commit

Permalink
Use useWeakSharedState
Browse files Browse the repository at this point in the history
  • Loading branch information
tujoworker committed Dec 13, 2024
1 parent cc3ad9c commit 6d74664
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/dnb-eufemia/src/components/upload/useUpload.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useCallback, useMemo } from 'react'
import { useSharedState } from '../../shared/helpers/useSharedState'
import { useWeakSharedState } from '../../shared/helpers/useSharedState'
import type { UploadFile, UploadFileNative, UploadProps } from './types'

export type useUploadReturn = {
Expand All @@ -17,7 +17,7 @@ export type useUploadReturn = {
* Use together with Upload with the same id to manage the files from outside the component.
*/
function useUpload(id: UploadProps['id']): useUploadReturn {
const { data, extend } = useSharedState<{
const { data, extend } = useWeakSharedState<{
files?: Array<UploadFile>
internalFiles?: Array<UploadFile>
}>(id)
Expand Down

0 comments on commit 6d74664

Please sign in to comment.