-
Notifications
You must be signed in to change notification settings - Fork 274
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
Recenter item in functional component #92
Comments
HI, I have the same problem. Is there any solution? |
@plaporte @AramArakelyan22 You can try something like this:
All you need is useState, then you need to center it in some kind of action (press button and etc). If you have any suggestions for improvement, go on :) |
i tried this but can't seem to get it working with a functional component |
I was able to get it working using ref instead of onRef as well as close() instead of recenter()
|
I'm using Swipeable component within a functional component. How can I call recenter() correctly?
The text was updated successfully, but these errors were encountered: