chenglou / react-motion

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

react-native chrome debug remotely breaks react-motion #339

Open micahrye opened 8 years ago

micahrye commented 8 years ago

I was playing around react-motion in react-native. Simple animation was working fine, but when launch chrome remote debugging it no longer works. You can see in the code below I am simply change the position of the Text view and I am printing out the x value. This all works without debugging, but as soon as launch debugging "x" remains 0 and there is not change.

NOTE: seeing similar issues as this react-native issue 4933

<Motion defaultStyle={{x: 0}} style={{x: spring(100)}}>
   {val => {
          let style = {
            position: 'absolute',
            top: val.x * 2.5,
            left: val.x * 3,
            backgroundColor: '#0000ff',
            color: '#fff'
          };
          return (
            <Text style={style}>{val.x}</Text>
            )}}
  </Motion>

react-motion version: "react-motion": "^0.4.4",

react-native version: react-native-cli: 0.2.0 react-native: 0.27.1

Chrome: Version 50.0.2661.102 (64-bit)

chenglou commented 8 years ago

Hmm, so I guess this is a RN issue? If so, should this be closed?