RoJoHub / react-native-ping

Highly accurate ICMP Ping controller for React Native
https://www.npmjs.com/package/react-native-ping
62 stars 47 forks source link

ReactNative in Expo #70

Open jamg26 opened 3 years ago

jamg26 commented 3 years ago

`import React from "react"; import { Text } from "native-base"; import Ping from "react-native-ping";

const Home = (props) => { React.useEffect(() => { (async () => { try { const ms = await Ping.start("114.114.114.114", { timeout: 1000 }); console.log(ms); } catch (error) { console.log(error.message); } })(); }, []);

return ( <>

Hi
</>

); };

export default Home; `

RESPONSE: null is not an object (evaluating 'RNReactNativePing.start')

RoJoHub commented 1 year ago

The way expo is integrated, I didn't test, is there any expo developer to help me

Charles-Johnson commented 10 months ago

I assume @jamg26 was running their app on Expo Go. If you are on a managed workflow, then you'll need to build a development client using eas build and run the app on that. That's what has worked for me