Skip to content

Commit 0fe55b8

Browse files
authored
docs: update docs (#22)
* docs: use-motion readme uses correct syntax * docs: use useMotion in readme instead of useMotor
1 parent 1604508 commit 0fe55b8

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ If you find a bug or have a feature request, please [open an issue](https://gith
1515

1616
Check out some featured hooks:
1717

18-
- [🦾 `useMotor`](src/use-motor/) - Creates a motor and returns a binding, a function to set the goal, and a motor API
18+
- [🦾 `useMotion`](src/use-motion/) - Creates a memoized Motion object set to the given initial value. Returns a binding that updates with the Motion, along with the Motion object.
1919
- [⏱️ `useAsync`](src/use-async/) - A hook that runs an async function and returns the result and status
2020
- [⚙️ `useTagged`](src/use-tagged/) - Tracks and returns a list of all instances with the given tag
2121

src/use-motion/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ function Button() {
2626
return (
2727
<textbutton
2828
Event={{
29-
MouseEnter: () => motion.spring(1, config.spring.stiff),
30-
MouseLeave: () => motion.spring(0, config.spring.stiff),
29+
MouseEnter: () => hoverMotor.spring(1, config.spring.stiff),
30+
MouseLeave: () => hoverMotor.spring(0, config.spring.stiff),
3131
}}
3232
Size={new UDim2(0, 100, 0, 100)}
3333
BackgroundTransparency={hover.map((t) => lerp(0.8, 0.5, t))}

0 commit comments

Comments
 (0)