Skip to content

fix: renderProps ref#9305

Merged
SevereCloud merged 1 commit intomasterfrom
SevereCloud/fix/renderProps-ref
Dec 16, 2025
Merged

fix: renderProps ref#9305
SevereCloud merged 1 commit intomasterfrom
SevereCloud/fix/renderProps-ref

Conversation

@SevereCloud
Copy link
Copy Markdown
Contributor

Описание

Реакт компилятор ругается на следующий код:

import * as React from 'react';

export default function MyApp({ renderProp}) {
  const ref = React.useRef(false)

  const onClick = () => {
    ref.current = true
  }
  
  return <div>{renderProp({ onClick })}</div>;
}

Однако если прокинуть в renderProp реф, то реакт компилятор перестает ругаться

-   return <div>{renderProp({ onClick })}</div>;
+   return <div>{renderProp({ ref, onClick })}</div>;

Изменения

Добавлены костыли для работы реакт компилятора

Release notes

@SevereCloud SevereCloud requested a review from a team as a code owner December 16, 2025 10:27
@SevereCloud SevereCloud self-assigned this Dec 16, 2025
@SevereCloud SevereCloud added this to VKUI Dec 16, 2025
@github-actions github-actions bot added the ci:cherry-pick:patch Автоматизация: PR продублируется в ветку последнего минорного релиза для выпуска патча label Dec 16, 2025
@SevereCloud SevereCloud removed the ci:cherry-pick:patch Автоматизация: PR продублируется в ветку последнего минорного релиза для выпуска патча label Dec 16, 2025
@SevereCloud SevereCloud moved this to 👀 In Review in VKUI Dec 16, 2025
@SevereCloud SevereCloud added this to the v8.0.0 milestone Dec 16, 2025
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 16, 2025

size-limit report 📦

Path Size
JS 425.87 KB (+0.02% 🔺)
JS (gzip) 128.76 KB (+0.01% 🔺)
JS (brotli) 105.4 KB (-0.06% 🔽)
JS import Div (tree shaking) 1.67 KB (0%)
CSS 370.28 KB (0%)
CSS (gzip) 45.9 KB (0%)
CSS (brotli) 36.39 KB (0%)

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 16, 2025

e2e tests

Playwright Report

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 16, 2025

📊 Найдены изменения в собранных файлах: Отчет

Commit 706cf2d

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Dec 16, 2025

👀 Docs deployed

📦 Package ✅

yarn add @vkontakte/vkui@https://development.s3.prodcloud.vk.team/pull/9305/706cf2d76913a1c358bd9ff8a423d274ffb5eb05/pkg/@vkontakte/vkui/_pkg.tgz

Commit 706cf2d

@SevereCloud SevereCloud marked this pull request as draft December 16, 2025 10:37
@SevereCloud SevereCloud force-pushed the SevereCloud/fix/renderProps-ref branch from 1f42ca8 to 8ed48ed Compare December 16, 2025 10:46
@SevereCloud SevereCloud force-pushed the SevereCloud/fix/renderProps-ref branch from 8ed48ed to 706cf2d Compare December 16, 2025 10:47
@codecov
Copy link
Copy Markdown

codecov bot commented Dec 16, 2025

Codecov Report

❌ Patch coverage is 66.66667% with 3 lines in your changes missing coverage. Please review.
✅ Project coverage is 95.00%. Comparing base (6ab45c2) to head (706cf2d).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
...i/src/components/ChipsInputBase/ChipsInputBase.tsx 50.00% 1 Missing ⚠️
...es/vkui/src/components/ChipsSelect/ChipsSelect.tsx 80.00% 1 Missing ⚠️
.../vkui/src/components/CustomSelect/CustomSelect.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #9305      +/-   ##
==========================================
- Coverage   95.03%   95.00%   -0.03%     
==========================================
  Files         416      416              
  Lines       11211    11217       +6     
  Branches     4217     4223       +6     
==========================================
+ Hits        10654    10657       +3     
- Misses        557      560       +3     
Flag Coverage Δ
unittests 95.00% <66.66%> (-0.03%) ⬇️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@SevereCloud SevereCloud marked this pull request as ready for review December 16, 2025 11:04
@SevereCloud SevereCloud merged commit bb1376e into master Dec 16, 2025
54 of 56 checks passed
@SevereCloud SevereCloud deleted the SevereCloud/fix/renderProps-ref branch December 16, 2025 14:08
@github-project-automation github-project-automation bot moved this from 👀 In Review to ✅ Done in VKUI Dec 16, 2025
@inomdzhon inomdzhon linked an issue Dec 17, 2025 that may be closed by this pull request
1 task
@inomdzhon inomdzhon removed this from VKUI Dec 17, 2025
@inomdzhon inomdzhon removed this from the v8.0.0 milestone Dec 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Tech] Поддержка React компилятора

2 participants