[feat]: Interpolate with a delay

オープン
#1,957 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
35/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
react, typescript
領域
frontend

調査の方向性

issue ではファイルもテストも指定されていません。まず SpringValue interpolation API の場所を特定し、delay の例を確認します。次に、非対称なアニメーション遅延を含む、遅延付き interpolation の動作を定義し、その説明どおりに遅延付きの値と遅延なしの値が動作することを示すテストカバレッジを追加します。

索引モデルが issue の本文から書いたものです。

説明

template: request
A clear and concise description of what the feature is

When using SpringValue interpolations, we should be able to interpolate with a delay.

Why should this feature be included?

For complex animations with multiple components and values being animated together, it's nice to be able to hook them all to one driving spring. It can be very difficult to use the existing interpolation API to stage animations, especially when they are asymmetrical (want a delay on animation in, no delay on animation out).

Please provide an example for how this would work
import {delay} from 'react-spring'

const spring = useSpring({ x: isActive ? 1 : 0})

// component with delay
<animated.div style={{opacity: spring.x.to(x => delay(x, 200))}} />

// component without delay
<animated.div style={{opacity: spring.x}} />

// component with existing api
<animated.div style={{opacity: spring.x.to([0, 0.5, 1), [0, 1, 1])}} />
主要言語
TypeScript
スター
29.3k
フォーク
1.2k
平均マージ
3日 15時間
マージ済み PR(30日)
17

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pmndrs/react-spring のほかの issue

pmndrs/react-spring の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。