Closed StevenMasini closed 5 years ago
Thanks @StevenMasini for sharing the issue and solution. I will merge the PR.
Thanks </ Pranav >
I am still working on the PR and testing my changes on my own project.
For now iOS work very well, even solved another bug that I didn't expect, but I will give more detail in the PR.
For android I am blocked with a bug which I think is related to this issue from react-native.
To make it simple, the method findNodeHandle
does not return the right viewId
to the android native side, which cause findViewById
to return null
.
For now there is not much I can do to solve this bug, but at least the library does not make the app crash thanks to my previous commit #13
I will try to update to the latest version of react native 0.57
(for now I am still using 0.55.4
) and see if I still have this issue. If so I will open an issue there to see if we can fix it.
Hi @StevenMasini:
For Android you need to add collapasable:false
props to the view you are targeting. Basically for performance improvement RN is not maintaining view tree map in native for the container views.
But if you add collapasable:false
it will start working. Please refer below link for the detailed explanation:
Please let me know incase it does not works.
Thanks </ Pranav >
@prscX You was right, there is a correlation between this optimization and the issue that findNodeHandle
has to retrieve correct viewId
. This helped me to solve some issues I had in my own project. We should probably mention it in the documentation.
I am going to submit my PR soon for this issue. Review it carefully and let me know if you want to add any change to it.
@prscX I close this issue as the branch #16 has been merged.
Hi @prscX me again,
While I was investigating two different bug on iOS and Android, I found out that they actually share the same root cause.
The root cause of these two issues is that the library don't require the parent view reference on the javascript side. Which should add a prop to retrieve the parent view reference.
I am also working on PR for this right now.