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

docs: fix ReactDOM import #4392

Closed
wants to merge 1 commit into from

Conversation

ernado
Copy link
Contributor

@ernado ernado commented Mar 4, 2023

Warning: You are importing createRoot from "react-dom" which is not supported. You should instead import it from "react-dom/client".

Ref: facebook/create-react-app#12219

@ernado ernado requested a review from a team as a code owner March 4, 2023 04:13
Importing createRoot from "react-dom" is not supported.
@codesandbox-ci
Copy link

codesandbox-ci bot commented Mar 4, 2023

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.

Latest deployment of this branch, based on commit 15e6b18:

Sandbox Source
VKUI TypeScript Configuration

@codecov
Copy link

codecov bot commented Mar 4, 2023

Codecov Report

Patch coverage has no change and project coverage change: -3.97 ⚠️

Comparison is base (5572dad) 80.80% compared to head (15e6b18) 76.84%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4392      +/-   ##
==========================================
- Coverage   80.80%   76.84%   -3.97%     
==========================================
  Files         336      271      -65     
  Lines        8944     8446     -498     
  Branches     2948     2896      -52     
==========================================
- Hits         7227     6490     -737     
- Misses       1717     1956     +239     
Flag Coverage Δ
a11ytests ?
e2e-chromium-android-dark ?
e2e-chromium-android-light ?
e2e-chromium-vkcom-dark ?
e2e-chromium-vkcom-light ?
e2e-firefox-vkcom-dark ?
e2e-firefox-vkcom-light ?
e2e-webkit-ios-dark ?
e2e-webkit-ios-light ?
e2e-webkit-vkcom-dark ?
e2e-webkit-vkcom-light ?
unittests 76.84% <ø> (ø)

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

Impacted Files Coverage Δ
...ckages/vkui/src/components/ImageBase/validators.ts 18.00% <0.00%> (-78.00%) ⬇️
packages/vkui/src/components/Textarea/Textarea.tsx 0.00% <0.00%> (-55.56%) ⬇️
...kui/src/components/ModalRoot/ModalRootAdaptive.tsx 0.00% <0.00%> (-50.00%) ⬇️
...ages/vkui/src/components/UsersStack/UsersStack.tsx 48.00% <0.00%> (-46.12%) ⬇️
packages/vkui/src/lib/warnOnce.ts 58.33% <0.00%> (-41.67%) ⬇️
...ponents/HorizontalScroll/HorizontalScrollArrow.tsx 41.66% <0.00%> (-41.67%) ⬇️
...components/PanelHeaderButton/PanelHeaderButton.tsx 57.69% <0.00%> (-34.62%) ⬇️
packages/vkui/src/hooks/useInsets.ts 41.37% <0.00%> (-31.04%) ⬇️
...mponents/AppearanceProvider/AppearanceProvider.tsx 71.42% <0.00%> (-28.58%) ⬇️
.../vkui/src/components/WriteBarIcon/WriteBarIcon.tsx 67.39% <0.00%> (-28.27%) ⬇️
... and 177 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 4, 2023

👀 Styleguide deployed

See the styleguide for this PR at https://vkcom.github.io/VKUI/pull/4392/

@BlackySoul
Copy link
Contributor

Привет! Спасибо за PR 🙂

Мы поддерживаем не только 18 версию реакта, но и 17, а для неё импорты из react-dom валидны. Возможно, в документации будет лучше просто оставить пометку, что в 18 версии нужен другой импорт?

@ernado
Copy link
Contributor Author

ernado commented Mar 6, 2023

Да, точно, пропустил поддержку 17 версии.

В принципе 18 версия не ломается, так что можно просто подождать, когда дропнете поддержку 17. Как поменять импорты в целом понятно, если что - люди найдут этот PR по поиску и починят ворнинг.

PR пока закрою.

@ernado ernado closed this Mar 6, 2023
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.

None yet

2 participants