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

Refactor to a functional component and use hooks #2

Open
ajenkins opened this issue Dec 16, 2019 · 0 comments
Open

Refactor to a functional component and use hooks #2

ajenkins opened this issue Dec 16, 2019 · 0 comments
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@ajenkins
Copy link
Owner

For some reason I couldn't get this to work so I gave up. Every time the state updated the position get reset, even though it was wrapped in a useRef. This resulted in a bug where the card would snap back to the center while you were dragging it, every time you passed the card over the mid-line (which triggered setSwipeDirection).

@ajenkins ajenkins changed the title Refactor to be functional component with hooks Refactor to be a functional component and use hooks Dec 16, 2019
@ajenkins ajenkins changed the title Refactor to be a functional component and use hooks Refactor to a functional component and use hooks Dec 16, 2019
@ajenkins ajenkins added enhancement New feature or request help wanted Extra attention is needed labels Dec 16, 2019
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

1 participant