Open razaina opened 1 week ago
I'm not entirely sure why they'd be null - perhaps it has something to do with the fact that pendingProps
is pre-render and memoizedProps
is post-render.
Is there a chance that the element you're targeting isn't updated to reflect the actual values yet? I'd add more logging and see if you can find a fully-populated instance of it elsewhere in the tree - or even at a different time (like after a navigation event or something else that triggers a Fiber re-render). At first glance I'd assume that what you've posted here is the first instance of the rendered element, before the props have been assigned and updated.
FWIW I'm working on HBC merging in hermes_rs right now, and plan on building an API that allows people to hook specific functions with the bytecode itself. When that's done, hooking React.createElement
will be fairly trivial and we'll be able to access direct references to the objects. I'll try to update this issue when I have something working!
Let me know if you figure it out, btw!
Hi,
i tried to play a bit with
react-native-elements.ts
as I was trying to understand how to get access to a specific property of a JSX.Element.I am not very familiar with React-native so I thought it would help me to learn more about it.
Let's say I have this code.
I want to get access to
dataA
orisDoingJob
fromJobView
, here is the injected JS code:The output:
How come
dataA
is "null" ? I don't really know what i am missing here. Do you have any idea how to reachdataA
?