Розмір відео: 1280 X 720853 X 480640 X 360
Показувати елементи керування програвачем
Автоматичне відтворення
Автоповтор
🙂👍
Nice one. Can you please show how to use this modal for add/edit form.
you can pass the form as children to the dialog. {isEdit ? "Edit Item" : "Add Item"} {isEdit ? "Edit your item details." : "Add a new item."} { // Handle form submission console.log(data); setShowFormDialog(false); }} />
Why choose context?And when the child components gets rerender?
I chose Context because it’s lightweight, built into React.you can conditionally render the modal like this:{showSignInModal && } to ensures the modal only renders when it’s needed.Thanks for pointing it out.
🙂👍
Nice one. Can you please show how to use this modal for add/edit form.
you can pass the form as children to the dialog.
{isEdit ? "Edit Item" : "Add Item"}
{isEdit ? "Edit your item details." : "Add a new item."}
{
// Handle form submission
console.log(data);
setShowFormDialog(false);
}}
/>
Why choose context?
And when the child components gets rerender?
I chose Context because it’s lightweight, built into React.
you can conditionally render the modal like this:
{showSignInModal && } to ensures the modal only renders when it’s needed.
Thanks for pointing it out.