[Bridge] RCT_EXPORT_METHOD for instance methods, rather than class methods
See original GitHub issueI have an RN View that can tell me whenever a button is pressed. However, I want to link this information back to the current state of the ViewController
instance. How can this be done?
The only way I can think of is through listening out for NSNotification
s as well as emitting them from the exported methods.
Issue Analytics
- State:
- Created 8 years ago
- Comments:15 (13 by maintainers)
Top Results From Across the Web
React Native Bridge - exporting one function in another file in ...
So, my concern is that if I change getImageForIcon from an instance method to a class method, won't that cause other issues in...
Read more >Bridging in React Native by Tadeu Zagallo
This whole setup is only to provide information to the bridge, so it can find everything that was exported, modules and methods, but...
Read more >Native Modules · React Native - API Manual
The return type of bridge methods is always void . React Native bridge is asynchronous, so the only way to pass a result...
Read more >iOS Native Modules
React Native will not expose any methods in a native module to ... Instead, you can do the argument conversion within the method...
Read more >Swift in React Native - The Ultimate Guide Part 1: Modules
Next, you have to expose your Swift class to React Native. ... expose native classes if you don't expose some of their methods,...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I don’t understand. Does RCT_EXPORT_METHOD only work on class methods or only on instance methods (and does it call the default init constructor itself)? I’m trying to create a Swift object over on the javascript side by calling init but that dies.
@paramaggarwal Does this functionality still exist? My subclass of RCTViewManager has self.bridge, but no self.bridge.uiManager. I need to call addUIBlock. How can this be achieved in React native 0.49.1?