mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: See commentary at top of stack. Changelog: [Added][Fabric] New API for efficient props construction Reviewed By: javache Differential Revision: D37050376 fbshipit-source-id: 2bea35a6d604704cf430bd3b2914988227d1abf8
49 lines
1.0 KiB
C++
49 lines
1.0 KiB
C++
/*
|
|
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <yoga/YGStyle.h>
|
|
|
|
#include <react/renderer/core/Props.h>
|
|
#include <react/renderer/core/PropsParserContext.h>
|
|
#include <react/renderer/debug/DebugStringConvertible.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
class YogaStylableProps : public Props {
|
|
public:
|
|
YogaStylableProps() = default;
|
|
YogaStylableProps(
|
|
const PropsParserContext &context,
|
|
YogaStylableProps const &sourceProps,
|
|
RawProps const &rawProps,
|
|
bool shouldSetRawProps = true);
|
|
|
|
void setProp(
|
|
const PropsParserContext &context,
|
|
RawPropsPropNameHash hash,
|
|
const char *propName,
|
|
RawValue const &value);
|
|
|
|
#pragma mark - Props
|
|
|
|
YGStyle yogaStyle{};
|
|
|
|
#if RN_DEBUG_STRING_CONVERTIBLE
|
|
|
|
#pragma mark - DebugStringConvertible (Partial)
|
|
|
|
SharedDebugStringConvertibleList getDebugProps() const;
|
|
|
|
#endif
|
|
};
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|