Skip to content

Commit 47c8513

Browse files
Fix: utils issue with next 15 server building (rjsf-team#4861)
Fixed issue where the new hooks were failing next 15 server builds when importing `@rjsf/utils` - Updated the new v6 hooks to add `use client` to them so that NextJS 15 doesn't fail on server-side builds
1 parent 619eead commit 47c8513

File tree

3 files changed

+6
-0
lines changed

3 files changed

+6
-0
lines changed

packages/utils/src/useAltDateWidgetProps.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import { MouseEvent, useCallback, useEffect, useMemo, useState } from 'react';
24

35
import dateRangeOptions from './dateRangeOptions';

packages/utils/src/useDeepCompareMemo.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import { useRef } from 'react';
24
import isEqual from 'lodash/isEqual';
35

packages/utils/src/useFileWidgetProps.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
'use client';
2+
13
import { useCallback, useMemo } from 'react';
24

35
import dataURItoBlob from './dataURItoBlob';

0 commit comments

Comments
 (0)