Matteo Mazzanti
Matteo Mazzanti

Reputation: 401

How to import the react-native-osc library in a react-native mobile application?

I am not able to import from react-native-osc library in my react-native project. The import results in an 'undefined' object.

I did install the library with npm:

$ npm install react-native-osc --save

In the App.js script, the object library is imported, anyway when I run the application in an Expo.io environment, the object osc is 'undefiend':

import osc from 'react-native-osc';
console.log(osc); // it will log 'undefined' on expo.io Android and expo.io web.

How to import the OSC functionality in a react-native project?
Thanks.

Upvotes: 0

Views: 180

Answers (1)

Luis Fer Garcia
Luis Fer Garcia

Reputation: 3784

Currently react-native-osc does not work with Expo. You need to eject your project from Expo or create a fresh new one with react-native init.

Upvotes: 2

Related Questions