Add prepareForReuse to RCTSafeAreaViewComponentView
Summary: Changelog: [internal] As part of recycle, we should delete state. This is a common pattern used in other components as well. Reviewed By: shergin Differential Revision: D21348782 fbshipit-source-id: a5dee2f4ccee9b19498db31dab1983d8879dca71
This commit is contained in:
Родитель
8acb2b3a3e
Коммит
577fdeaa62
|
@ -86,6 +86,12 @@ using namespace facebook::react;
|
|||
[self _updateStateIfNecessary];
|
||||
}
|
||||
|
||||
- (void)prepareForRecycle
|
||||
{
|
||||
[super prepareForRecycle];
|
||||
_state.reset();
|
||||
}
|
||||
|
||||
+ (ComponentDescriptorProvider)componentDescriptorProvider
|
||||
{
|
||||
return concreteComponentDescriptorProvider<SafeAreaViewComponentDescriptor>();
|
||||
|
|
Загрузка…
Ссылка в новой задаче