maxs15 / react-native-spinkit

A collection of animated loading indicators for React Native
MIT License
2.36k stars 300 forks source link

Red square issue running from react-native cli to emulator for IOS #36

Closed bernardn98 closed 7 years ago

bernardn98 commented 8 years ago

We ran these commands and copy/paste your code (https://github.com/maxs15/react-native-spinkit/blob/master/Example/index.ios.js) but could not get it to work. The emulator is showing a red square above the text menu. It threw a warning in the emulator that it could not find the Spinner component but the warning goes away when I switch from using require to import. However the animation runs fine with the same code when deploying to the emulator from xcode. Let us know if there's something else we can try. THANKS!

npm install react-native-spinkit@latest --save rnpm link react-native-spinkit

johnchourajr commented 8 years ago

Same error here.

jonrh commented 8 years ago

I had the same red square but not sure if it's exactly the same issue. The React Native Package Manager RNPM has been merged into React Native core. Running the following commands in my project folder worked for me:

npm install react-native-spinkit@latest --save
react-native link react-native-spinkit

Then in my React component I load it in with ES2015 module syntax and use the Spinner component like the example shows:

import Spinner from "react-native-spinkit";

// Inside render()
<Spinner isVisible={true} size={40} type={"ThreeBounce"} color={"black"} />
yuanfang-fn commented 7 years ago

react-native link react-native-spinkit (node:32024) DeprecationWarning: os.tmpDir() is deprecated. Use os.tmpdir() instead.

bernardn98 commented 7 years ago

Thanks everyone will close this issue. There was another library we had in our project that conflicted with this one.