Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

React 18. Moveable(internal) and react state is out of sync during concurrent rendering #668

Closed
zaqqaz opened this issue May 17, 2022 · 1 comment
Labels
bug Something isn't working complete React
Milestone

Comments

@zaqqaz
Copy link

zaqqaz commented May 17, 2022

Environments

  • Framework name: React
  • Framework version: 18
  • Moveable Component version: 0.32.8-beta.3 | 0.32.7

Description

React state values and moveable container out of sync (easy to reproduce with throttling, likely requires https://reactjs.org/docs/hooks-reference.html#usesyncexternalstore to be used).

Tested with 0.32.7 and 0.32.8-beta.3. To reproduce the issue you need to use new api of react-dom(import {createRoot} from 'react-dom/client';), everything is in sync with old react-dom api (react17 compatability mode)

2022-05-17.12.10.29.mov
@zaqqaz zaqqaz changed the title React 18 React 18 Moveable(internal) and react state is out of sync during concurrent rendering May 17, 2022
@zaqqaz zaqqaz changed the title React 18 Moveable(internal) and react state is out of sync during concurrent rendering React 18. Moveable(internal) and react state is out of sync during concurrent rendering May 17, 2022
@daybrush daybrush added bug Something isn't working React labels Jun 7, 2022
@daybrush daybrush added this to the 0.30.0 milestone Jun 9, 2022
daybrush added a commit that referenced this issue Jun 9, 2022
@daybrush
Copy link
Owner

daybrush commented Jun 9, 2022

@zaqqaz

  • lit-moveable 0.7.0
  • moveable 0.30.0
  • preact-moveable 0.32.0
  • react-compat-moveable 0.18.0
  • react-moveable 0.33.0
  • svelte-moveable 0.22.0
  • vue-moveable 2.0.0-beta.21
  • vue3-moveable 0.5.0
  • ngx-moveable 0.27.0

moveable's new version is released.
See this docs:
https://github.com/daybrush/moveable/tree/master/packages/react-moveable#react-18-concurrent-mode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working complete React
Projects
None yet
Development

No branches or pull requests

2 participants