[bug]: Typescript error with `position: "absolute"`
Open
Nobody has claimed this yet.
area: typescript
kind: bug
- Dominant language
- TypeScript
- Stars
- 29.1k
- Forks
- 1.2k
- PR merge metrics
- No merged PRs in 30d
Description
Which react-spring target are you using?
-
@react-spring/web -
@react-spring/three -
@react-spring/native -
@react-spring/konva -
@react-spring/zdog
What version of react-spring are you using?
9.5.5
What's Wrong?
Setting position: "absolute" in the from property of the useTransition hook shows a typescript error when setting style on the animated div.
To Reproduce
Set position: "absolute" in the from property of the useTransition hook.
Expected Behaviour
No errors
Link to repo
https://codesandbox.io/s/youthful-gianmarco-y5q1v2?file=/src/App.tsx
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 by running the linked CodeSandbox and reproducing the TypeScript error with @react-spring/web, useTransition, and an animated div. Trace the types involved in the from property and style assignment; done means position: "absolute" produces no TypeScript error in the reproduced example.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100