Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Reactjs 如何将react运动库与modals一起使用_Reactjs_React Native_React Redux_React Router_React Motion - Fatal编程技术网

Reactjs 如何将react运动库与modals一起使用

Reactjs 如何将react运动库与modals一起使用,reactjs,react-native,react-redux,react-router,react-motion,Reactjs,React Native,React Redux,React Router,React Motion,我使用react模态创建模态,并尝试从页面底部滑动模态。为此,我尝试使用react-motion-transition-motion组件。我的代码是: { this.state.openNumberPopup && <TransitionMotion styles={[{key: 'key',style: this.getStyles()}] } > { (interpolated) => <div>

我使用react模态创建模态,并尝试从页面底部滑动模态。为此,我尝试使用react-motion-transition-motion组件。我的代码是:

{ this.state.openNumberPopup &&
  <TransitionMotion
    styles={[{key: 'key',style: this.getStyles()}] } 
  > 
   {
     (interpolated) => 
       <div> {
         interpolated.map(({ key, style, data }) => 
           <NumberPopup
             key={${key}-transition}
             style={{opacity: style.opacity,transform: scale(${style.scale})}}
             openNumberPopup={this.state.openNumberPopup}
             toggleNumberPopup={this.toggleNumberPopup}
             handleChange={this.handleChange}
             updateNumber={this.updateNumber}
             disableSubmit={this.state.disableSubmit} 
           />
         )
        } 
      </div>
    } 
  </TransitionMotion>
}

但这不起作用,因为模态组件。

我以错误的方式使用了TransitionMotion。相反,我在这里使用了运动,我用的是错误的过渡运动。相反,我在这里使用了运动。
getStyles = () => ({ opacity: spring(1), scale: spring(1) });