Repository navigation
docs(useIsomorphicLayoutEffect): state that the effect never runs on the server #557
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
mnxmnz
wants to merge
1
commit into
main
Choose a base branch
from
docs/use-isomorphic-layout-effect-server
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| 'react-simplikit': patch | ||
| --- | ||
|
|
||
| The JSDoc of `useIsomorphicLayoutEffect` now states that the effect never runs on the server and that the hook only avoids the `useLayoutEffect` warning, and no longer claims it supports both client and server environments. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletions
8
packages/plugin/skills/react-simplikit/references/useIsomorphicLayoutEffect.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletions
8
...t-simplikit/src/hooks/useIsomorphicLayoutEffect/es/useIsomorphicLayoutEffect.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 6 additions & 4 deletions
10
...t-simplikit/src/hooks/useIsomorphicLayoutEffect/ja/useIsomorphicLayoutEffect.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
7 changes: 5 additions & 2 deletions
7
...t-simplikit/src/hooks/useIsomorphicLayoutEffect/ko/useIsomorphicLayoutEffect.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 5 additions & 3 deletions
8
...eact-simplikit/src/hooks/useIsomorphicLayoutEffect/useIsomorphicLayoutEffect.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
이렇게 한 문단으로 적어볼 수도 있을거 같아요 ! 🤔
'서버에서 이 훅은
useEffect이고, 리액트는 이를 실행하지 않아요.' < 요것은 구현에 대한 세부사항을 드러내는 것 아닐까 싶기도 하구요 🤔 🤔 🤔 (물론 간단하고 + 개발자가 알고 사용하면 좋긴 할거라 공감도 돼요 🤔 )이 부분에 대해서는 어떻게 생각하시나요 ??!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"useLayoutEffect를 사용하면 리액트가 경고를 보내요." -> "useLayoutEffect를 사용하면 경고가 발생해요."
여기서는 굳이 "리액트"가 붙지 않아도 괜찮을거 같아요.
"보내요" 자체가 React시점이기 때문에 조금 어색하게 느껴지는거 아닐까 생각이 듭니다.
문서를 읽는 독자 시점에서는 누가 경고를 보내는지보다 어떤 상황에서 경고가 발생하는지에 대한 여부만 아는 형태면 될거같아요.
조금 더 독자에게 필요한 정보에 초점을 맞추는 형태(?)로 전환하는건 어떨까요 ?