VKCOM / VKUI

VKUI – это набор React-компонентов, с помощью которых можно создавать интерфейсы, внешне неотличимые от наших iOS и Android приложений.
https://vkcom.github.io/VKUI/
MIT License
1.04k stars 185 forks source link

fix(useReducedMotion): use state #8008

Closed SevereCloud closed 4 days ago

SevereCloud commented 4 days ago

Описание

Хук 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.

Изменения

Release notes

Исправления

github-actions[bot] commented 4 days ago

size-limit report 📦

Path Size
JS 385.31 KB (-0.02% 🔽)
JS (gzip) 116.79 KB (-0.03% 🔽)
JS (brotli) 96.14 KB (-0.03% 🔽)
JS import Div (tree shaking) 1.56 KB (0%)
CSS 334.98 KB (0%)
CSS (gzip) 42.41 KB (0%)
CSS (brotli) 33.42 KB (0%)
codesandbox-ci[bot] commented 4 days ago

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.

github-actions[bot] commented 4 days ago

e2e tests

Playwright Report

codecov[bot] commented 4 days ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 95.46%. Comparing base (cb55d05) to head (f9173e7). Report is 3 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #8008 +/- ## ========================================== - Coverage 95.46% 95.46% -0.01% ========================================== Files 380 381 +1 Lines 11324 11320 -4 Branches 3777 3776 -1 ========================================== - Hits 10811 10807 -4 Misses 513 513 ``` | [Flag](https://app.codecov.io/gh/VKCOM/VKUI/pull/8008/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VKCOM) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/VKCOM/VKUI/pull/8008/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VKCOM) | `95.46% <100.00%> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=VKCOM#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

vkcom-publisher commented 7 hours ago
v7.0.0 🎉