Skip to content

Commit

Permalink
Move OwningShadowNodeFragment to a separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
tomekzaw committed Sep 13, 2024
1 parent 5638b54 commit 06fd71e
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
#if defined(RCT_NEW_ARCH_ENABLED) || defined(ANDROID)

#include <react/renderer/core/LayoutContext.h>

#include "MarkdownShadowFamilyRegistry.h"
#include "MarkdownTextInputDecoratorShadowNode.h"

using namespace expensify::livemarkdown;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

#include "MarkdownShadowFamilyRegistry.h"
#include "MarkdownTextInputDecoratorState.h"
#include <jsi/jsi.h>
#include "OwningShadowNodeFragment.h"
#include <react/renderer/components/RNLiveMarkdownSpec/EventEmitters.h>
#include <react/renderer/components/RNLiveMarkdownSpec/Props.h>
#include <react/renderer/components/view/ConcreteViewShadowNode.h>
Expand All @@ -13,20 +13,6 @@ using namespace expensify::livemarkdown;
namespace facebook {
namespace react {

struct OwningShadowNodeFragment {
Props::Shared props;
ShadowNode::SharedListOfShared children;
State::Shared state;

operator ShadowNodeFragment() const {
return ShadowNodeFragment {
.props = props,
.children = children,
.state = state
};
}
};

JSI_EXPORT extern const char MarkdownTextInputDecoratorViewComponentName[];

class JSI_EXPORT MarkdownTextInputDecoratorShadowNode final
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#pragma once
#if defined(RCT_NEW_ARCH_ENABLED) || defined(ANDROID)

#include <react/renderer/core/Props.h>
#include <react/renderer/core/ShadowNode.h>
#include <react/renderer/core/ShadowNodeFragment.h>
#include <react/renderer/core/State.h>

using namespace facebook::react;

namespace expensify {
namespace livemarkdown {

struct OwningShadowNodeFragment {
Props::Shared props;
ShadowNode::SharedListOfShared children;
State::Shared state;

operator ShadowNodeFragment() const {
return ShadowNodeFragment {
.props = props,
.children = children,
.state = state
};
}
};

} // namespace livemarkdown
} // namespace expensify

#endif

0 comments on commit 06fd71e

Please sign in to comment.