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

[WIP] Try to upgrade to React 18 #1541

Closed
wants to merge 1 commit into from
Closed

[WIP] Try to upgrade to React 18 #1541

wants to merge 1 commit into from

Conversation

davidmz
Copy link
Member

@davidmz davidmz commented Apr 22, 2022

Closes #1540

@github-actions
Copy link

github-actions bot commented Apr 22, 2022

🎊 PR Preview a040c45 has been successfully built and deployed to https://FreeFeed-freefeed-react-client-preview-pr-1541.surge.sh

🕐 Build time: 215.076s

🤖 By surge-preview

@davidmz davidmz marked this pull request as draft April 22, 2022 15:40
@davidmz
Copy link
Member Author

davidmz commented Apr 22, 2022

На первый взгляд, оно работает, но только на первый. При закрытии лайтбокса возникает ошибка “Cannot read properties of null (reading 'updateScrollOffset')”. При переходе с главной страницы на /friends — “this.dropzone.getActiveFiles is not a function”. В общем, реакт стал слишком асинхронным, и биндинги к сторонним библиотекам к этому не готовы. Дропзону я давно хотел заменить, и есть чем, а вот лайтбокс заменить пока нечем.

@davidmz
Copy link
Member Author

davidmz commented Apr 22, 2022

Ну и тесты все сломались, но там, наверное, несложно починить.

@davidmz
Copy link
Member Author

davidmz commented Apr 22, 2022

Вообще, я встречал сообщения, что люди вместо React 18 переходят на Preact — он более совместимый, весит в сто раз меньше и даже работает быстрее.

@indeyets
Copy link
Contributor

про тесты: там, видимо, нужно в связке менять:

  • @testing-library/react
  • @testing-library/react-hooks
  • react-test-renderer
  • use-subscription
  • react-redux

@davidmz davidmz closed this Jan 22, 2024
@davidmz davidmz deleted the react18 branch January 22, 2024 11:37
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.

Upgrade to React 18
2 participants