Dynamic Shared Values #3740
Unanswered
jakubgrzelak
asked this question in
Q&A
Replies: 1 comment 1 reply
-
i have the same problem. documentation lacks of real word examples. Have you found a solution? 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
-
Hey community!
I am struggling with adding shared values dynamically. I am building trello like board from the scratch. Before I render cards in their lists I have to build values such as
x
,y
andorder
. It is done like that cause I must be able to modify cards from inside other card - for instance to reorder them.After that I am able to attach that values
onLayout
. I made it work but unfortunately there is a huge memory leak with such implementation. @wcandillon uses such approach in his tutorial https://www.youtube.com/watch?v=tHWGKdpj1rsI know that such usage validates rules of hooks ... Can you suggest other solution? Another suggestion to use
makeMutable
instead ofuseSharedValue
doesn't help cause memory leak increases after each come back to board.Beta Was this translation helpful? Give feedback.
All reactions