Skip to content

Proposal: Add an isAnimated(val) existential method #9

@lelandrichardson

Description

@lelandrichardson
var Animated = require('animated');
var anim = new Animated.Value(123);
var interp = anim.interpolate({ ... });
Animated.isAnimated(anim) // true
Animated.isAnimated(interp) // true
Animated.isAnimated(123) // false

This would be a good API to provide people for detecting whether or not a given value is an animated value or not. This could be used, for example, to produce PropTypes helpers for the library.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions