Open vvusts opened 3 weeks ago
📂 package.json
:
{
+ "main": "index.js"
}
index.js
:import registerRootComponent from 'expo/build/launch/registerRootComponent';
import App from './App';
registerRootComponent(App);
// Add your HeadlessTask here
//
//
I’ll give it a try. I didn’t have idea it could be done like this in expo.
Your Environment
react-native -v
): 0.73.6Expected Behavior
Use this plugin with expo project with headless mode on.
Actual Behavior
Missing documentation on how to use headless mode in expo.
This is question, as plugin works perfectly with react native CLI (tested on most androids) even when app is terminated. Expo SDK50 doesn't have index.js file, so I don't know where to put this code:
Since in expo project there is no
AppRegistry.registerComponent
. It could be good idea to see somewhere in documentation how to integrate plugin in expo. I mean it is easy to install it but adding this code for index file is missing.