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

Does not work with React/Fast Refresh #47

Open
rookbreezy opened this issue Jul 24, 2020 · 5 comments
Open

Does not work with React/Fast Refresh #47

rookbreezy opened this issue Jul 24, 2020 · 5 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@rookbreezy
Copy link

I'm wondering if anyone has got it working with react refresh?

I'm using Next.js and everything is working with fast refresh except react-movable. Tried with react beautiful dnd and that works fine.

I'm forced to fully reload the page every time I change something in a react-movable .

@tajo tajo added enhancement New feature or request help wanted Extra attention is needed labels Jul 24, 2020
@purellarohith
Copy link

I have same issue. Is there any way to resolve it?

@rookbreezy
Copy link
Author

@timmeade
Copy link

timmeade commented Feb 2, 2022

I have same issue. I tried both react-beutiful-dnd and react-dnd and this one works far better on mobile. I even tried with using source instead of npm and it still does not reload if using componets passed to:

import RenderList from './RenderList';
import RenderItem from './RenderItem';

<List
  lockVertically
  values={items}
  onChange={({ oldIndex, newIndex }) =>
    setItems(arrayMove(items, oldIndex, newIndex))
  }
  renderList={RenderList}
  renderItem={RenderItem}
/>

Code works great. Just no fast refresh in next.

@timmeade
Copy link

timmeade commented Feb 2, 2022

I wonder if somewhere in npm there is an incorrect case. That seems to be #1 reason to cause this.

@rookbreezy
Copy link
Author

I tried both react-beutiful-dnd and react-dnd and this one works far better on mobile.

A trick I did to make it work better on mobile is forking beautiful-dnd and setting timeForLongPress to 0. This removes the delay when dragging on mobile.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

4 participants