export usePrompt and useConfirm hooks
Shaddix opened this issue Β· comments
Artur Drobinskiy commented
Thanks for the lib!
Would you mind exporting the hooks that you have (usePrompt
and useConfirm
), so that it'd be possible to use them?
github-actions commented
Hey, @Shaddix. Thank you so much for taking the time to point this out
Shyam Gupta commented
@Shaddix Open in v0.5.4
You can use it as:
Import ππ»
import { useConfirm, usePrompt } from "react-router-prompt";
useConfirm
ππ»
const { isActive, onConfirm, resetConfirmation } = useConfirm(when)
usePrompt
ππ»
const blocker = usePrompt(when)