react-component / react-component/util
useMobile hooks in version v5.28.0
Open
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 670
- Forks
- 205
- Avg merge
- 11d 17h
- Merged PRs (30d)
- 4
Description
Env:
- use Remix with antd
- React SSR(node)
- InputNumber Component dep the rc-utils
- rc-utils v5.28.0 add
useMobilehooks, inuseMobilecalluseLayoutEffect,useLayoutEffectcalled in ssr node env, so react-dom give auseLayoutEffectwarning.
Since useLayoutEffect, a warning is issued, consider using useEffect? Otherwise, if it is used in SSR, you will always be warned.
Contributor guide
No contributing guide indexed for this repository
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 locating the useMobile hook introduced in rc-utils v5.28.0 and inspect how it calls useLayoutEffect during React SSR in the reported Remix/Node environment. Reproduce the server-rendering warning, then verify that the hook no longer emits it while its client-side behavior remains intact.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, react, typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100