mirror of
https://github.com/status-im/react-native.git
synced 2025-01-19 22:09:53 +00:00
80f7891287
Summary: @public This is follow up for D8601600 and D8247652 (the last one has detailed explanation of the problem). From this commit I propose that we have to follow simple rule: If some prop has a default value which differs from the default value of its type, we have to specify it as {<value>} in .h file and explicitly in .m file, for all other props the default value must not be specified explicitly (in .h files it must be specified as {}). The reason is that we have to embrase those cases and establish behaviour: if we change the default value in .h file, it always means that we have to change the value in .cpp file too. Reviewed By: fkgozali Differential Revision: D8601776 fbshipit-source-id: 3379aace4e2d72febb2b942a3da1cb24decf54be
41 lines
782 B
C++
41 lines
782 B
C++
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
*
|
|
* 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 <memory>
|
|
|
|
#include <fabric/core/Props.h>
|
|
#include <fabric/debug/DebugStringConvertible.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
class RawTextProps;
|
|
|
|
using SharedRawTextProps = std::shared_ptr<const RawTextProps>;
|
|
|
|
class RawTextProps:
|
|
public Props {
|
|
|
|
public:
|
|
|
|
RawTextProps() = default;
|
|
RawTextProps(const RawTextProps &sourceProps, const RawProps &rawProps);
|
|
|
|
#pragma mark - Props
|
|
|
|
const std::string text {};
|
|
|
|
#pragma mark - DebugStringConvertible
|
|
|
|
SharedDebugStringConvertibleList getDebugProps() const override;
|
|
};
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|