是否考虑新增一个useStickyFixed(),用于获取当前元素是否处于吸顶状态?
Open
pr welcomed
v4
- Dominant language
- TypeScript
- Stars
- 15k
- Forks
- 2.8k
- Avg merge
- 15h 7m
- Merged PRs (30d)
- 2
Description
当元素处于吸顶状态,会处理一些样式或逻辑,这种场景还是很多的;
类似这种
```js
const isFixed = useStickyFixed({ref:domRef});
```
Contributor guide
Research direction
The issue proposes a new TypeScript/React hook with the API useStickyFixed({ref: domRef}) to report whether an element is currently sticky. First clarify the expected return value and how sticky-state transitions should be detected; done means the hook behavior and its edge cases are covered by tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- react, typescript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100