Skip to content

Commit

Permalink
Compatible unique id gen (#2916)
Browse files Browse the repository at this point in the history
  • Loading branch information
nlkluth authored Oct 14, 2024
1 parent fba0f47 commit ca2b468
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/soft-balloons-wink.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"victory-core": patch
---

replace useId for backwards compatibility
4 changes: 2 additions & 2 deletions packages/victory-core/src/victory-portal/victory-portal.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from "react";
import { defaults } from "lodash";
import { defaults, uniqueId } from "lodash";
import * as Log from "../victory-util/log";
import * as Helpers from "../victory-util/helpers";
import { usePortalContext } from "./portal-context";
Expand All @@ -15,7 +15,7 @@ const defaultProps: Partial<VictoryPortalProps> = {

export const VictoryPortal = (initialProps: VictoryPortalProps) => {
const props = { ...defaultProps, ...initialProps };
const id = React.useId();
const id = uniqueId();
const portalContext = usePortalContext();

if (!portalContext) {
Expand Down

0 comments on commit ca2b468

Please sign in to comment.