|
|
|
|
|
by fredliu
3555 days ago
|
|
I've ran through most of the intro doc, but I'm still not sure if Exponent supports invoking platform/system APIs? E.g. if I want to access clipboard contents, or wifi network configuration, etc, how can it be done with Exponent? With React Native, I can write corresponding functionalities using Java or Swift/ObjC, and then integrate it with the RN main app, but how can this be done with Exponent? |
|
Exponent exposes all of the React Native built-in APIs which encompass a lot of what you're asking about.
For example, here is the Clipboard API: https://facebook.github.io/react-native/docs/clipboard.html
Wifi network configuration is more complicated, but there are some things exposed like "NetInfo" which lets you know the current state of connectivity. https://facebook.github.io/react-native/docs/netinfo.html
The complete React Native docs are here: https://facebook.github.io/react-native/ and Exponent specific docs are here: http://docs.getexponent.com/
For now, Exponent just lets you write things that only use JS, and we make that easy and reliable and straightforward. We actually think this is the best way to write most apps that can be built this way since the code is easier to maintain and works cross platform, and you can do things like instant updates much more reliably when all your code is JS.
We're looking at a way you can write Java/Swift/Obj-C extensions for Exponent, but that will take us some time.