Is there any (straightforward) way to assign the value of a Swift global variable (of double_t type) from ReactJS Native JavaScript? Or (scaling back from an XY question) is there any other way to make a (floating-point) Number computed in ReactJS Native JavaScript, and access it from a .swift file?
Asked
Active
Viewed 68 times
1 Answers
2
No. At least not directly.
You can make your own Native Module that React Native can call on and get data from. This allows you to write some native code that has a method that can be called to deliver the info you need. Then you write some javascript to that calls that method.
Note the Swift Specific documentation here.

Alex Wayne
- 178,991
- 47
- 309
- 337
-
Thank you. ReactJS Native looks promising, but what I've found in my digging and asking so far suggests I would be wiser to see what I can get from Swift. I appreciate the note, and what I have done in ReactJS JavaScript so far looks like it *should* be portable at least to Swift. – Christos Hayward Oct 17 '15 at 00:04