React Native Share Extension - Access to AsyncStorage?

Viewed 1384

I am working on an application in react native, and was taking a look at some tutorials for creating a 'share extension' within the app. I see on npm react-native-share-extension how to create the extension within the project in xcode, and create a new component with a second AppRegistry (shown from npm example).

//index.ios.js 
import React from 'react'
import { AppRegistry } from 'react-native'

import App from './app.ios'
import Share from './share.ios'

AppRegistry.registerComponent('Sample1', () => App)
AppRegistry.registerComponent('MyShareEx', () => Share)

Does anyone know if the share component would have access to the data stored by the main app in AsyncStorage? (i.e my login token)

Thanks!

2 Answers

I would recommend to use native share extension since share extension have limited memory limit. It causes memory issue if you invoke react app from extenion.

Related