mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Add support for commands
Summary: We need commands to work with `LegacyViewManagerInterop`. We will need to rethink this once Fabric has command-execution pipeline in place. Reviewed By: shergin Differential Revision: D17787294 fbshipit-source-id: a6b3dbfae41f04e7e7f5bafb1f7b4ad0de0eedc3
This commit is contained in:
committed by
Facebook Github Bot
parent
5dbd62c7ff
commit
1bf2f72abe
+7
@@ -46,6 +46,13 @@ using namespace facebook::react;
|
||||
}
|
||||
}
|
||||
|
||||
- (NSString *)componentViewName_DO_NOT_USE_THIS_IS_BROKEN
|
||||
{
|
||||
const auto &state = _state->getData();
|
||||
RCTLegacyViewManagerInteropCoordinator *coordinator = unwrapManagedObject(state.coordinator);
|
||||
return coordinator.componentViewName;
|
||||
}
|
||||
|
||||
#pragma mark - RCTComponentViewProtocol
|
||||
|
||||
+ (ComponentDescriptorProvider)componentDescriptorProvider
|
||||
|
||||
+2
@@ -23,6 +23,8 @@ typedef void (^InterceptorBlock)(std::string eventName, folly::dynamic event);
|
||||
|
||||
- (void)setProps:(folly::dynamic const &)props forView:(UIView *)view;
|
||||
|
||||
- (NSString *)componentViewName;
|
||||
|
||||
@end
|
||||
|
||||
NS_ASSUME_NONNULL_END
|
||||
|
||||
+6
@@ -8,6 +8,7 @@
|
||||
#include "RCTLegacyViewManagerInteropCoordinator.h"
|
||||
#include <React/RCTComponentData.h>
|
||||
#include <React/RCTFollyConvert.h>
|
||||
#include <React/RCTUtils.h>
|
||||
#include <folly/json.h>
|
||||
|
||||
using namespace facebook::react;
|
||||
@@ -54,4 +55,9 @@ using namespace facebook::react;
|
||||
[_componentData setProps:convertedProps forView:view];
|
||||
}
|
||||
|
||||
- (NSString *)componentViewName
|
||||
{
|
||||
return RCTDropReactPrefixes(_componentData.name);
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user