Skip to content

Releases: nandorojo/moti

v0.16.0

07 Oct 17:45
Compare
Choose a tag to compare

0.16.0 (2021-10-07)

Features

Derived/shared value support for animate prop

Commit: (4ffb25f)

You can now use a Reanimated Derived or Shared value as your animate prop. This is a huge step forward for allowing Moti to work with Gestures and other shared values.

Whereas before you could only animate based on state:

<MotiView animate={{ opacity: loading ? 1 : 0 }} />

Now, you can also animate based on shared values.

const isActive = useSharedValue(false)

const animate = useDerivedValue(() => {
  return { opacity: isActive.value ? 1 : 0 }
})

return <MotiView animate={animate} />

Unlike normal reanimated, you don't use withTiming here. Moti will automatically animate changes for you. And you can customize changes with the transition prop.

TypeScript support

import { MotiAnimationProp } from 'moti'

And pass it to useDerivedValue from reanimated:

const isActive = useSharedValue(false)

useDerivedValue<MotiAnimationProp<ViewStyle>>(() => {
  return {
    opacity: isActive.value ? 1 : 0
  }
}, [])

return <MotiView animate={animate} />

In the future, Moti may export its own hook to wrap this for you.

v0.15.4

05 Oct 20:47
Compare
Choose a tag to compare

0.15.4 (2021-10-05)

Features

  • add hoveredValue and pressedValue props to MotiPressable for controlled usage (16cc7e1)

v0.15.3

30 Sep 02:37
Compare
Choose a tag to compare

0.15.3 (2021-09-30)

Bug Fixes

  • passing backgroundSize prop to AnimatedGradient (dee8986)

v0.15.2

23 Sep 00:05
Compare
Choose a tag to compare

Features

→ Sequences now work with loop: true and repeat!

<MotiView
  animate={{
    opacity: [0, 1, { value: 0, delay: 1000 }]
  }}
  transition={{
    loop: true,
  }}
/>

Fixes

→ Fix AnimatePresence's custom prop on native
→ Don't default to from styles if there aren't any

v0.14.2

03 Sep 21:53
Compare
Choose a tag to compare

0.14.2 (2021-09-03)

Note: Version bump only for package moti

v0.14.1 Interactions

02 Sep 22:11
Compare
Choose a tag to compare

0.14.1 adds Moti's first interaction-focused feature: MotiPressable ⚡️

Full docs are available at moti.fyi/interactions/overview.

Simulator.-.iPhone.8.Plus.mp4
Read more

v0.14.0

02 Sep 22:10
Compare
Choose a tag to compare

0.14.0 (2021-09-02)

Bug Fixes

  • examples (9721cff)
  • remove web delay default; attemptedValue typo (df5174f)

Features

  • merge-animate-prop (3713f2e)
  • transition & exitTransition can be shared/derived value (0c945b7)
  • use-moti-pressable-transition (cf6162d)

0.13.0-alpha.0 (2021-08-29)

Bug Fixes

Features

  • add animated TS types to moti types (7845c44)
  • add useMotiPressableInterpolate & useMotiPressableAnimatedProps (7923000)
  • init pressable (7b9e897)
  • use-pressable[s] (a36b5ec)
  • web-only dropdown menu (2b8c944)

v0.13.0

02 Sep 21:33
Compare
Choose a tag to compare

0.13.0 (2021-09-02)

Bug Fixes

  • typeof null === object fix for sequences (80f7092)

Features

  • transform support, with sequences (665bdf6)

v0.12.3

01 Sep 18:24
Compare
Choose a tag to compare

0.12.3 (2021-09-01)

Bug Fixes

  • exit over-memoized on native (2f717df)

Reverts

  • removing useValue hack, as order is not preserved. only solution is transform array (again) (42dd3c9)
  • removing useValue hack, as order is not preserved. only solution is transform array (034c8dc)

v0.12.2

01 Sep 17:14
Compare
Choose a tag to compare

0.12.2 (2021-09-01)

Bug Fixes

  • closes #104, where exit completion never fired (da4eafa)