You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my use case, I need to store the coordinates, size, and rotation of the target as React state and use that state to render the target instead of manipulating the DOM directly. In React 17, the following code snippet worked:
When resizing by dragging the top left handle, the coordinates diverge. The moveable component and the target split positions.
This may not be the correct way to use your library. How can I implement this use case correctly? It's important for me to manage the state and not use direct transformations because, under the hood, it's a Three.js object rendered on a 2D stage.
The text was updated successfully, but these errors were encountered:
Environments
Description
In my use case, I need to store the coordinates, size, and rotation of the target as React state and use that state to render the target instead of manipulating the DOM directly. In React 17, the following code snippet worked:
react 17 sandbox
However, with React 18, the same code does not work as expected:
react 18 sandbox
When resizing by dragging the top left handle, the coordinates diverge. The moveable component and the target split positions.
This may not be the correct way to use your library. How can I implement this use case correctly? It's important for me to manage the state and not use direct transformations because, under the hood, it's a Three.js object rendered on a 2D stage.
The text was updated successfully, but these errors were encountered: