Skip to content

fix(useStableCallback): rm useRef#7963

Merged
SevereCloud merged 1 commit intomasterfrom
SevereCloud/fix/useStableCallback/rm-useRef
Nov 21, 2024
Merged

fix(useStableCallback): rm useRef#7963
SevereCloud merged 1 commit intomasterfrom
SevereCloud/fix/useStableCallback/rm-useRef

Conversation

@SevereCloud
Copy link
Copy Markdown
Contributor


  • 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 на useCallback в хуке useStableCallback

Release notes

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

github-actions bot commented Nov 19, 2024

size-limit report 📦

Path Size
JS 383.14 KB (0%)
JS (gzip) 116.12 KB (+0.01% 🔺)
JS (brotli) 95.54 KB (-0.17% 🔽)
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 84ebe94

@SevereCloud SevereCloud self-assigned this Nov 20, 2024
@SevereCloud SevereCloud force-pushed the SevereCloud/fix/useStableCallback/rm-useRef branch from 5d8ff9d to 84ebe94 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 (84ebe94).
Report is 9 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #7963   +/-   ##
=======================================
  Coverage   95.26%   95.26%           
=======================================
  Files         378      378           
  Lines       11218    11218           
  Branches     3744     3744           
=======================================
  Hits        10687    10687           
  Misses        531      531           
Flag Coverage Δ
unittests 95.26% <100.00%> (ø)

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 b046b5d into master Nov 21, 2024
@SevereCloud SevereCloud deleted the SevereCloud/fix/useStableCallback/rm-useRef branch November 21, 2024 11:28
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.

3 participants