Closed mkubdev closed 1 year ago
If you would like to continue contributing to open source and would like to do it with an awesome inclusive community, you should join our GitHub Organisation - we help and encourage each other to contribute to open source little and often :neckbeard:. Any questions let us know.
Noice!!! 🔥🔥🔥
Using useCallback
to more safety. 😁
const handleConfirm = useCallback( () => {
console.log('confirmed!');
}, []);
Noice!!! 🔥🔥🔥
Using
useCallback
to more safety. 😁const handleConfirm = useCallback( () => { console.log('confirmed!'); }, []);
I will add this change, can you add a suggestion so that i commit change directly? Will finish it today, hehe i forget this one.
Is this metaphor are ready to close?
Is this metaphor are ready to close?
No, let me complete it! 😁
Complete and close this metaphor :100:
Metaphore Name
Next.js - Reusable Confirm Dialog
Share your metaphore story!
TODO: Add gif here!
TLDR
This is a complete guide on how to create a reusable confirm dialog component for
next.js
. Here we go!Prerequisites
Before you begin, ensure that you have
node
andnpm
orYarn
installed on your machine. Here is a run-down of the core technologies we will be using.flex
,pt-4
,text-center
androtate-90
that can be composed to build any design, directly in your markup.Setup
Create a next.js application with tailwind pre-configured:
Components
ConfirmDialog
ButtonCancel
ButtonConfirm
How to use the component?
In order to use the
<ConfirmDialog />
component, you need to use a boolean state to display it:A demo/repos link
No response