When we have any state update our JSX inside the Draggable does not re-render and remains the same. i am using react-drag-reorder to reoder my divs as per user requirement.
We can solve this problem by using a callback find this answer at GitHub Issue
const MyComponent = ()=>{
const [val, setVal] = useState('');
const DraggableRender = useCallback(() => {
return (
<Draggable
>
<p>{val}</p>
</Draggable>
);
}, [val]);
return(
<DraggableRender/>
)
}