How to keep track of the SKRect Value like x, y, width and height? #1537
Unanswered
jeremiahlachica
asked this question in
Q&A
Replies: 1 comment 1 reply
-
I have solved it. I'm currently using a different architecture for my project. React Native + MVVM using Mobx. I used observables to store all data I need to retain the position and dimension so even if the component re-renders it will stay in the same exact position. I think this can also be achieved in regular useState. Thanks |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to follow this example from @wcandillon :
https://github.com/wcandillon/can-it-be-done-in-react-native/tree/master/bonuses/sticker-app
When I try to pan or move object like the Location Sticker, whenever the parent component re-renders, the position of the sticker resets back to original. How can I keep track of the x,y, width and height value to avoid resetting to original position?
Thanks so much to whoever will help. :)
By the way, thanks for making great example on your repository and youtube channel. @wcandillon
Beta Was this translation helpful? Give feedback.
All reactions