Hello World
{reducedMotion ? You're using reduced motion!
: null}
)
}
```
## Stopping animations
So how does this hook have the ability to stop all animations? `react-spring` has a `Globals` object,
these global objects are used for to synchronize hooks across your application. One property that can
be set is called `skipAnimation`. This property is a boolean and is checked by either the `Controller`
or `SpringValue` to see if it should animate. If `skipAnimation` is set to `true` then the animation
will "jump" to the goal value, similar to if the immediate prop is `true`.
The animation below has it's `skipAnimation` set to `true` so it will instantly jump to the goal value,
check the code to learn more.
```jsx live=true
import { useRef, useEffect } from 'react'
import { useSpring, animated, Globals } from '@react-spring/web'
export default function MyApp() {
const isRight = useRef(false)
const [springs, api] = useSpring(
() => ({
x: 0,
}),
[]
)
const handleClick = () => {
api.start({
x: isRight.current ? 0 : 200,
onRest: () => {
isRight.current = !isRight.current
},
})
}
useEffect(() => {
Globals.assign({
skipAnimation: true,
})
return () => {
Globals.assign({
skipAnimation: false,
})
}
})
return (