mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
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:
committed by
Facebook GitHub Bot
parent
8acb2b3a3e
commit
577fdeaa62
@@ -86,6 +86,12 @@ using namespace facebook::react;
|
||||
[self _updateStateIfNecessary];
|
||||
}
|
||||
|
||||
- (void)prepareForRecycle
|
||||
{
|
||||
[super prepareForRecycle];
|
||||
_state.reset();
|
||||
}
|
||||
|
||||
+ (ComponentDescriptorProvider)componentDescriptorProvider
|
||||
{
|
||||
return concreteComponentDescriptorProvider<SafeAreaViewComponentDescriptor>();
|
||||
|
||||
Reference in New Issue
Block a user