Skip to content

Conversation

@exoRift
Copy link

@exoRift exoRift commented Nov 6, 2025

Previously, if a component containing a useDialog hook would rerender, it would replace the Dialog wth a new component because it would redefine the component.

The consequences of this were that

  • State changes would cause the dialog to close
  • Form submission callbacks that alter the state close the dialog without any animation

Now, the component is memo'd and state changes do not recreate the dialog in the DOM

@netlify
Copy link

netlify bot commented Nov 6, 2025

👷 Deploy Preview for react-daisyui processing.

Name Link
🔨 Latest commit b1f6ab1
🔍 Latest deploy log https://app.netlify.com/projects/react-daisyui/deploys/690cd77dac8b750008c8e7ac

1 similar comment
@netlify
Copy link

netlify bot commented Nov 6, 2025

👷 Deploy Preview for react-daisyui processing.

Name Link
🔨 Latest commit b1f6ab1
🔍 Latest deploy log https://app.netlify.com/projects/react-daisyui/deploys/690cd77dac8b750008c8e7ac

@netlify
Copy link

netlify bot commented Nov 6, 2025

Deploy Preview for react-daisyui ready!

Name Link
🔨 Latest commit 8825f1b
🔍 Latest deploy log https://app.netlify.com/projects/react-daisyui/deploys/690cdced3b414f0008d8f793
😎 Deploy Preview https://deploy-preview-486--react-daisyui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@exoRift exoRift changed the title Use React.memo for useDialog Dialog component Use React.useCallback for useDialog Dialog component Nov 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant