Skip to content

Commit 06ad967

Browse files
committed
💄 Gloss: Format Code
1 parent 2b5973b commit 06ad967

File tree

3 files changed

+30
-17
lines changed

3 files changed

+30
-17
lines changed

‎ios/Sources/IosUtilitiesView/IosUtilitiesView.mm‎

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,6 @@ @implementation IosUtilitiesView {
1919
UIView * _view;
2020
}
2121

22-
+ (ComponentDescriptorProvider)componentDescriptorProvider
23-
{
24-
return concreteComponentDescriptorProvider<IosUtilitiesViewComponentDescriptor>();
25-
}
26-
2722
- (instancetype)initWithFrame:(CGRect)frame
2823
{
2924
static const auto defaultProps = std::make_shared<const IosUtilitiesViewProps>();
@@ -37,7 +32,8 @@ - (instancetype)initWithFrame:(CGRect)frame
3732
return self;
3833
}
3934

40-
- (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &)oldProps
35+
- (void)updateProps:(Props::Shared const &)props
36+
oldProps:(Props::Shared const &)oldProps
4137
{
4238
const auto &oldViewProps = *std::static_pointer_cast<IosUtilitiesViewProps const>(_props);
4339
const auto &newViewProps = *std::static_pointer_cast<IosUtilitiesViewProps const>(props);
@@ -52,11 +48,6 @@ - (void)updateProps:(Props::Shared const &)props oldProps:(Props::Shared const &
5248
[super updateProps:props oldProps:oldProps];
5349
}
5450

55-
Class<RCTComponentViewProtocol> IosUtilitiesViewCls(void)
56-
{
57-
return IosUtilitiesView.class;
58-
}
59-
6051
// MARK: - RNIBaseView
6152
// -------------------
6253

@@ -65,5 +56,18 @@ - (Class)viewDelegateClass
6556
return [IosUtilitiesViewDelegate class];
6657
}
6758

59+
// MARK: - Fabric
60+
// --------------
61+
62+
+ (ComponentDescriptorProvider)componentDescriptorProvider
63+
{
64+
return concreteComponentDescriptorProvider<IosUtilitiesViewComponentDescriptor>();
65+
}
66+
67+
Class<RCTComponentViewProtocol> IosUtilitiesViewCls(void)
68+
{
69+
return IosUtilitiesView.class;
70+
}
71+
6872
@end
6973
#endif

‎ios/Sources/RNIBaseView/RNIBaseView.mm‎

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,15 @@
2020
using namespace facebook::react;
2121

2222
@interface RNIBaseView () <RNIViewLifecycleEventsNotifying>
23-
2423
@end
2524

2625
@implementation RNIBaseView {
2726
UIView * _view;
2827
RNIBaseViewState::SharedConcreteState _state;
2928
}
3029

31-
// This is meant to be overriden
32-
- (Class _Nonnull)viewDelegateClass {
33-
return [UIView class];
34-
}
30+
// MARK: - Init
31+
// ------------
3532

3633
- (instancetype)initWithFrame:(CGRect)frame
3734
{
@@ -63,6 +60,9 @@ - (instancetype)initWithFrame:(CGRect)frame
6360
return self;
6461
}
6562

63+
// MARK: - Fabric Lifecycle
64+
// ------------------------
65+
6666
-(void)mountChildComponentView:(UIView<RCTComponentViewProtocol> *)childComponentView
6767
index:(NSInteger)index
6868
{
@@ -187,5 +187,13 @@ -(void) prepareForRecycle
187187
[super prepareForRecycle];
188188
}
189189

190+
// MARK: - Dummy Impl.
191+
// -------------------
192+
193+
// This is meant to be overridden by the subclass
194+
- (Class _Nonnull)viewDelegateClass {
195+
return [UIView class];
196+
}
197+
190198
@end
191199
#endif

‎ios/Sources/RNIBaseView/RNIBaseViewState.cpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,10 @@
77

88
#include "RNIBaseViewState.h"
99

10+
1011
namespace facebook::react {
1112

12-
folly::dynamic RNIBaseViewState::getDynamic() const {
13+
folly::dynamic RNIBaseViewState::getDynamic() const {
1314

1415
folly::dynamic map = folly::dynamic::object;
1516
map["frameWidth"] = this->frameSize.width;

0 commit comments

Comments
 (0)