Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move OwningShadowNodeFragment to a separate file #488

Merged
merged 1 commit into from
Sep 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading