After using require, the import function works as expected:
let dgram = require('react-native-udp')
However, when attempting to use the same module with import:
import dgram from 'react-native-udp'
An error occurs:
Cannot read property 'createsocket' of undefined
Upon inspecting the directory within node_modules for more information, I found:
https://i.sstatic.net/iaNU7.png
I also experimented with:
import {dgram} from 'react-native-udp'
Still resulting in the same error message.