Skip to content

Reanimated's mock-engine preset implements a subset of the library's API #783

Open

Description

@danfry1

Under the mock engine, presets.reanimated() implements a subset of react-native-reanimated (presets guide). The mock conformance probe checks it against the API that the locked version declares and finds the gaps below. Each one has a waiver in tests-native/conformance/reanimated.mock-waivers.json that names this issue. A waiver stops failing when the preset provides that member, and the probe then asks for it to be removed.

Missing exports

  • Layout animation builders and transitions (89): BaseAnimationBuilder, BounceIn, BounceInDown, BounceInLeft, BounceInRight, BounceInUp, BounceOut, BounceOutDown, BounceOutLeft, BounceOutRight, BounceOutUp, ComplexAnimationBuilder, CurvedTransition, EntryExitTransition, FadeIn, FadeInDown, FadeInLeft, FadeInRight, FadeInUp, FadeOut, FadeOutDown, FadeOutLeft, FadeOutRight, FadeOutUp, FadingTransition, FlipInEasyX, FlipInEasyY, FlipInXDown, FlipInXUp, FlipInYLeft, FlipInYRight, FlipOutEasyX, FlipOutEasyY, FlipOutXDown, FlipOutXUp, FlipOutYLeft, FlipOutYRight, JumpingTransition, Keyframe, Layout, LightSpeedInLeft, LightSpeedInRight, LightSpeedOutLeft, LightSpeedOutRight, LinearTransition, PinwheelIn, PinwheelOut, RollInLeft, RollInRight, RollOutLeft, RollOutRight, RotateInDownLeft, RotateInDownRight, RotateInUpLeft, RotateInUpRight, RotateOutDownLeft, RotateOutDownRight, RotateOutUpLeft, RotateOutUpRight, SequencedTransition, SharedTransition, SlideInDown, SlideInLeft, SlideInRight, SlideInUp, SlideOutDown, SlideOutLeft, SlideOutRight, SlideOutUp, StretchInX, StretchInY, StretchOutX, StretchOutY, ZoomIn, ZoomInDown, ZoomInEasyDown, ZoomInEasyUp, ZoomInLeft, ZoomInRight, ZoomInRotate, ZoomInUp, ZoomOut, ZoomOutDown, ZoomOutEasyDown, ZoomOutEasyUp, ZoomOutLeft, ZoomOutRight, ZoomOutRotate, ZoomOutUp
  • Test helpers (5): advanceAnimationByFrame, advanceAnimationByTime, getAnimatedStyle, setUpTests, withReanimatedTimer
  • Other exports (55): defineAnimation, GentleSpringConfig, GentleSpringConfigWithDuration, Reanimated3DefaultSpringConfig, Reanimated3DefaultSpringConfigWithDuration, SnappySpringConfig, SnappySpringConfigWithDuration, WigglySpringConfig, WigglySpringConfigWithDuration, withClamp, contrastColor, convertToRGBA, isColor, ReanimatedLogLevel, DynamicColorIOS, PlatformColor, processColor, InterfaceOrientation, IOSReferenceFrame, SensorType, LayoutAnimationConfig, PerformanceMonitor, ReducedMotionConfig, SharedTransitionBoundary, configureReanimatedLogger, enableLayoutAnimations, getViewProp, isConfigured, isReanimated3, NativeEventsManager, getDynamicFeatureFlag, getStaticFeatureFlag, setDynamicFeatureFlag, Extrapolate, startMapper, stopMapper, reanimatedVersion, dispatchCommand, getRelativeCoords, setNativeProps, getUseOfValueInStyleWarning, createAnimatedPropAdapter, finishScreenTransition, ScreenTransition, startScreenTransition, createWorkletRuntime, executeOnUIRuntimeSync, isWorkletFunction, makeShareableCloneRecursive, runOnRuntime, createCSSAnimatedComponent, cubicBezier, linear, steps, css

Missing members of exports the preset has

  • makeMutable: ()._value, ().setDirtyFlag
  • Easing: .poly, .sin, .circle, .exp, .elastic, .back, .bounce, .bezierFn, .steps
  • useAnimatedSensor: ().config.interval, ().config.adjustToInterfaceOrientation, ().config.iosReferenceFrame
  • useAnimatedStyle: ().viewDescriptors, ().initial, ().styleUpdaterContainer

Return values that differ from the declared type

  • useAnimatedRef() returns a plain object; the declared AnimatedRef is a callable function

That is 167 waivers. Under the native engine, the package's own Jest mock is served instead.

Activity

  1. added this to the 0.16.0 milestone on Nov 13, 2026
  2. added
    enhancement
    area:presets
    on Nov 13, 2026
  3. added
    priority:medium
    on Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:presetsenhancementpriority:medium

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions