<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>uggds</author_name>
  <author_url>https://blog.hatena.ne.jp/uggds/</author_url>
  <blog_title>UGA Boxxx</blog_title>
  <blog_url>https://uga-box.hatenablog.com/</blog_url>
  <categories>
    <anon>dnd-kit</anon>
  </categories>
  <description>dnd-kit の DragOverlay を使って、ドラッグ中のプレビュー表示をカスタマイズしたのだが、ドロップ直後に DragOverlay が一瞬消えて再描画されるので「チラつき」が気になった 原因はドラッグ終了時（onDragEnd）に activeId を即座に null にしていることだった 表示制御用の state を分ける なのでドラッグ状態と描画制御を別の state で管理し、dropEndで即座に overId を null にするのではなく 50ms ほど遅延して null にするとよかった 実装例 const [activeId, setActiveId] = use…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fuga-box.hatenablog.com%2Fentry%2F2025%2F04%2F11%2F000000&quot; title=&quot;【dnd-kit】DragOverlay が ドロップ直後にチラつく - UGA Boxxx&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-04-11 00:00:00</published>
  <title>【dnd-kit】DragOverlay が ドロップ直後にチラつく</title>
  <type>rich</type>
  <url>https://uga-box.hatenablog.com/entry/2025/04/11/000000</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
