You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It sure can, the example in README actually shows a functional component.
withConfirm is just a higher order component that is used to add a dialog alongside the wrapped component and open it whenever you call the confirm function added to the wrapped component props.
I do however plan to play around with turning this into hooks-based version that would require adding a context provider once and using const confirm = useConfirm(); whenever needed;
Can
material-ui-confirm
used in functional components?Why is
withConfirm
needed? Can't there just be a global "confirm" function?The text was updated successfully, but these errors were encountered: