We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
На каждом рендере мы создаем вновь реестры, из-за чего все вложенные компоненты рендерятся по новой (этот поинт описан в докуменетации реакта).
bem-react/packages/di/di.tsx
Lines 27 to 43 in 4723e3d
Пример — https://codepen.io/sartem/pen/wvaNjpO
Можно обернуть RegistryResolver в memo, либо советуют в документации, хранить значения контекста в локальном стейте компонента.
RegistryResolver
memo
The text was updated successfully, but these errors were encountered:
Resolve bem#551
2ee6943
fix(di): resolve bem#551 issue
ac88a1b
a75ce5a
21cbf14
ecef0b2
0bdacc9
f9c1661
6cc76fc
c4491a4
yarastqt
No branches or pull requests
Проблема
На каждом рендере мы создаем вновь реестры, из-за чего все вложенные компоненты рендерятся по новой (этот поинт описан в докуменетации реакта).
bem-react/packages/di/di.tsx
Lines 27 to 43 in 4723e3d
Пример — https://codepen.io/sartem/pen/wvaNjpO
Решение
Можно обернуть
RegistryResolver
вmemo
, либо советуют в документации, хранить значения контекста в локальном стейте компонента.The text was updated successfully, but these errors were encountered: