【问题标题】:ionic-react how to animate with <CreateAnimation> on component re render?ionic-react 如何在组件重新渲染时使用 <CreateAnimation> 进行动画处理?
【发布时间】:2020-04-01 11:37:38
【问题描述】:

我正在使用下面的代码为我的滑块菜单设置动画,因为没有合适的离子菜单控制器示例进行反应。

<CreateAnimation
            play={isLoaded}
            duration={500}
            fromTo={[
                { property: 'transform', fromValue: animateFrom, toValue: animateTo }
            ]}>


            ...my slider UI

</CreateAnimation>

问题是,它第一次运行良好。但在那之后它甚至在我的组件重新渲染之后也没有。

【问题讨论】:

    标签: reactjs ionic-framework animation ionic-react


    【解决方案1】:

    https://ionicframework.com/docs/cli/commands/start

    sidemenu - 带有内容区域导航的侧边菜单的起始项目

    Starters for @ionic/react (--type=react)
    
    name         | description
    --------------------------------------------------------------------------------------
    blank        | A blank starter project
    list         | A starting project with a list
    my-first-app | An example application that builds a camera with gallery
    sidemenu     | A starting project with a side menu with navigation in the content area
    tabs         | A starting project with a simple tabbed interface
    conference   | A kitchen-sink application that shows off all Ionic has to offer
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2020-05-03
      • 2019-10-29
      • 2020-03-24
      • 1970-01-01
      • 1970-01-01
      • 2020-01-27
      • 2015-05-02
      • 2021-08-03
      相关资源
      最近更新 更多