Open LunatiqueCoder opened 1 month ago
@LunatiqueCoder I think for now I am going to be very dependent on your word for if/when this is ready to go.
@lafiosca From my side, it's working like a charm.
If I turn on the new architecture, there is no error. If I revert the changes, and I still have the new architecture on, I got the error:
(NOBRIDGE) LOG Bridgeless mode is enabled
(NOBRIDGE) ERROR Warning: ref.measureLayout must be called with a ref to a native component.
Error is pretty self describing, and the fix is also easy 🚀 just deleted code and passed in the ref instead of the node handle :)
@LunatiqueCoder One more request... can you identify which minimum version of RN is required for this and update the README and peer deps?
@lafiosca I think this change shouldn't break older React Native versions. However, it would be nice to bump devDependencies
.
Also, I would suggest to use Expo's eslint config for OSS projects, it's pretty cool.
@lafiosca The new architecture is now enabled by default on new react native projects. Soon will be for expo too. Let me know if I can help. I'm always available on Discord.
Hello
This PR fixes:
174
171
The Problem
SOURCE: React Native Docs - Direct Manipulation: measureLayout()
Conclusion
On the new architecture,
measureLayout()
with arelativeToNativeNode
handler (instead of reference) is OBSOLETEI also opened a PR to update React Native Docs:
While passing a view ref will make it WORK with the new architecture, we should still use the new architecture capabilities.
From my testing this works fine, but I would love if the community reviews it and tests it.
Let me know if anyone needs help to test those changes!
Cheers 🍻