motiondivision / motiondivision/motion
[BUG] motion.div is not binding correctly when ref changes
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 33.7k
- Forks
- 1.4k
- Avg merge
- 1d 10h
- Merged PRs (30d)
- 14
Description
1. Read the FAQs 👇
2. Describe the bug
motion.div is not binding correctly when ref changes
3. IMPORTANT: Provide a CodeSandbox reproduction of the bug
https://codesandbox.io/s/laughing-cartwright-26zghl?file=/src/App.tsx
4. Steps to reproduce
Click the refresh button, and then observe the console.log information
5. Expected behavior
When ref changes, ref.current should always get the correct dom
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked CodeSandbox reproduction in src/App.tsx and follow the refresh-button interaction while inspecting the console output. Trace how motion.div handles the changing ref, then verify that ref.current points to the correct DOM element after each refresh.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100