Skip to content
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

fix(useModalRegistry): use useRef #7970

Closed

Conversation

SevereCloud
Copy link
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 по назначению

Release notes

@SevereCloud SevereCloud requested a review from a team as a code owner November 20, 2024 15:47
Copy link
Contributor

size-limit report 📦

Path Size
JS 385.53 KB (+0.02% 🔺)
JS (gzip) 116.85 KB (+0.01% 🔺)
JS (brotli) 96.03 KB (-0.02% 🔽)
JS import Div (tree shaking) 1.46 KB (0%)
CSS 334.79 KB (0%)
CSS (gzip) 42.35 KB (0%)
CSS (brotli) 33.39 KB (0%)

Copy link

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.

Copy link
Contributor

e2e tests

Playwright Report

Copy link
Contributor

👀 Docs deployed

Commit 7d62012

Copy link

codecov bot commented Nov 20, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.32%. Comparing base (ac5d63d) to head (7d62012).
Report is 98 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #7970      +/-   ##
==========================================
- Coverage   95.32%   95.32%   -0.01%     
==========================================
  Files         379      379              
  Lines       11299    11296       -3     
  Branches     3764     3764              
==========================================
- Hits        10771    10768       -3     
  Misses        528      528              
Flag Coverage Δ
unittests 95.32% <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.

@inomdzhon
Copy link
Contributor

в #6759 удалил этот хук

@SevereCloud SevereCloud self-assigned this Nov 28, 2024
@vkcom-publisher vkcom-publisher added pr-needs-work Автоматизация: PR автоматически закроется через 14 дней при отсутствии активности and removed pr-needs-work Автоматизация: PR автоматически закроется через 14 дней при отсутствии активности labels Dec 5, 2024
@inomdzhon
Copy link
Contributor

useModalRegistry удалён

@inomdzhon inomdzhon closed this Dec 11, 2024
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.

4 participants