We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d74c141 commit 8825f1bCopy full SHA for 8825f1b
src/Modal/Modal.tsx
@@ -87,13 +87,13 @@ const useDialog = () => {
87
dialogRef.current?.close()
88
}, [dialogRef])
89
90
- const Dialog = ({ children, ...props }: DialogProps) => {
+ const Dialog = useCallback<React.FunctionComponent>(({ children, ...props }: DialogProps) => {
91
return (
92
<Modal {...props} ref={dialogRef}>
93
{children}
94
</Modal>
95
)
96
- }
+ }, [dialogRef])
97
Dialog.displayName = 'Dialog'
98
return { dialogRef, Dialog, handleShow, handleHide }
99
}
0 commit comments