chenglou / react-motion

A spring that solves your animation problems.
MIT License
21.68k stars 1.16k forks source link

React Native installation #334

Open hasen6 opened 8 years ago

hasen6 commented 8 years ago

Checking through the comments it looks like this works with React Native. If so does it work with the latest version ie 25+? How would I go about installing it? Thanks.

Btw the demos look amazing!

bsansouci commented 8 years ago

@chenglou correct me if I'm wrong but this is now totally separated from react-dom, so you can Just Use It™ :D

hasen6 commented 8 years ago

So just $ npm install --save react-motion and then $ rnpm link and its good to go? Then require it with const ReactMotion = require('react-motion'); ?

hasen6 commented 8 years ago

Or do you mean its already installed as part of the React Native package? I couldn't see it in the node modules folder with the latest install though.

bsansouci commented 8 years ago

You ned to install it through npm yes, and then you should be able to just import {Motion, spring} from 'react-motion'; and get started :)

pvpshoot commented 8 years ago

Did anybody detect such issue on Android when Motion component does transfer initial styles, but no interpolated values? The issue isn't reproduced on iOS

<Motion
  defaultStyle={sceneStart}
  style={sceneFinish}
>
  {this.getScene}
</Motion>

getScene(value) {
  console.log(value);
}