Skip to content

fix(useLayoutEffectCall): rm useRef#7964

Merged
SevereCloud merged 1 commit intomasterfrom
SevereCloud/fix/useLayoutEffectCall/rm-useRef
Nov 20, 2024
Merged

fix(useLayoutEffectCall): rm useRef#7964
SevereCloud merged 1 commit intomasterfrom
SevereCloud/fix/useLayoutEffectCall/rm-useRef

Conversation

@SevereCloud
Copy link
Copy Markdown
Contributor

@SevereCloud SevereCloud commented Nov 19, 2024


  • Unit-тесты
  • e2e-тесты
  • Дизайн-ревью
  • Документация фичи
  • Release notes

Описание

Хук useRef нельзя использовать для чтения или записи во время рендеринга

Do not write or read ref.current during rendering.
...
If you have to read or write something during rendering, use state instead.

When you break these rules, your component might still work, but most of the newer features we’re adding to React will rely on these expectations. Read more about keeping your components pure.

Изменения

Заменяем useRef на useState в хуке useLayoutEffectCall

Release notes

@SevereCloud SevereCloud requested a review from a team as a code owner November 19, 2024 18:30
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 19, 2024

size-limit report 📦

Path Size
JS 382.98 KB (-0.05% 🔽)
JS (gzip) 116.11 KB (-0.02% 🔽)
JS (brotli) 95.44 KB (-0.28% 🔽)
JS import Div (tree shaking) 1.46 KB (0%)
CSS 334.66 KB (0%)
CSS (gzip) 42.33 KB (0%)
CSS (brotli) 33.39 KB (0%)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 19, 2024

e2e tests

Playwright Report

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Nov 19, 2024

👀 Docs deployed

Commit 83fe88b

@SevereCloud SevereCloud force-pushed the SevereCloud/fix/useLayoutEffectCall/rm-useRef branch 2 times, most recently from d6f45ca to b033b4c Compare November 19, 2024 19:26
Copy link
Copy Markdown
Contributor

@EldarMuhamethanov EldarMuhamethanov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@SevereCloud SevereCloud self-assigned this Nov 20, 2024
@SevereCloud SevereCloud force-pushed the SevereCloud/fix/useLayoutEffectCall/rm-useRef branch from b033b4c to 83fe88b Compare November 20, 2024 08:21
@codesandbox-ci
Copy link
Copy Markdown

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

@codecov
Copy link
Copy Markdown

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.26%. Comparing base (4ac222e) to head (83fe88b).
Report is 3 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7964      +/-   ##
==========================================
- Coverage   95.26%   95.26%   -0.01%     
==========================================
  Files         378      378              
  Lines       11218    11211       -7     
  Branches     3744     3743       -1     
==========================================
- Hits        10687    10680       -7     
  Misses        531      531              
Flag Coverage Δ
unittests 95.26% <100.00%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

@SevereCloud SevereCloud merged commit 9ada42b into master Nov 20, 2024
@SevereCloud SevereCloud deleted the SevereCloud/fix/useLayoutEffectCall/rm-useRef branch November 20, 2024 09:47
@SevereCloud SevereCloud added this to the v7.0.0-beta.2 milestone Nov 20, 2024
@vkcom-publisher
Copy link
Copy Markdown
Contributor

v7.0.0-beta.2 🎉

@inomdzhon inomdzhon modified the milestones: v7.0.0-beta.2, v7.0.0 Dec 2, 2024
@vkcom-publisher
Copy link
Copy Markdown
Contributor

v7.0.0 🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants