Skip to content

Commit

Permalink
Mark the use of attributes and events as deprecated (use setters inst…
Browse files Browse the repository at this point in the history
…ead) (#145)
  • Loading branch information
jorgea-stripe authored Jan 7, 2025
1 parent b47f513 commit 6fe4fe1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/utils/useAttachAttribute.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
import React from 'react';

/**
* @deprecated The method should not be used as we are deprecating the use of attributes directly.
* Define a setter for your use case and use useUpdateWithSetter instead.
*/
export const useAttachAttribute = (
component: HTMLElement | null,
attribute: string,
Expand Down
4 changes: 4 additions & 0 deletions src/utils/useAttachEvent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@ export enum ConnectElementEventNames {
instantPayoutCreated = 'instantpayoutcreated',
}

/**
* @deprecated The method should not be used as we are deprecating the use of events directly. Define a setter for
* your use case and use useUpdateWithSetter instead.
*/
export const useAttachEvent = (
component: HTMLElement | null,
eventName: ConnectElementEventNames,
Expand Down

0 comments on commit 6fe4fe1

Please sign in to comment.