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(retail-ui): fix react-hot-loader issue #1311

Merged
merged 8 commits into from Apr 5, 2019
Merged

Conversation

zhzz
Copy link
Member

@zhzz zhzz commented Apr 1, 2019

Ремейк #1269.

Проблема с react-hot-loader, который оборачивает компоненты и ломает проверку типа компонента через ReactElement.type. Встречалась у нескольких пользователей.

Кажется, самый простой и надежный способ - через статическое поле. Все известные способы перечислены тут: react-hot-loader/issues/304.

fix #1267

packages/retail-ui/components/Button/Button.tsx Outdated Show resolved Hide resolved
packages/retail-ui/components/MenuHeader/MenuHeader.tsx Outdated Show resolved Hide resolved
packages/retail-ui/components/MenuItem/MenuItem.tsx Outdated Show resolved Hide resolved
@wKich wKich requested a review from lossir April 2, 2019 06:12
@zhzz zhzz requested a review from wKich April 2, 2019 11:04
@zhzz
Copy link
Member Author

zhzz commented Apr 3, 2019

Инструкция по тестированию: zhzz/retail-ui-hot-reload.

@zhzz zhzz merged commit ca25531 into master Apr 5, 2019
@zhzz zhzz deleted the react-hot-loader-1267 branch April 5, 2019 13:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants