Files
react-native/ReactCommon/fabric/components/text/rawtext/RawTextProps.cpp
T
Joshua Gross bb5622dd89 Prop parsing: always require explicit default argument to convertRawProp
Summary:
Having automatic defaults/an optional arg for `convertRawProp` has caused way more problems than it is worth. Remove the default argument.

Changelog: [Internal]

Reviewed By: shergin

Differential Revision: D19151594

fbshipit-source-id: 839ec8d138b2c3c083f221a2871582454004648c
2019-12-18 15:02:09 -08:00

32 lines
803 B
C++

/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#include "RawTextProps.h"
#include <react/core/propsConversions.h>
#include <react/debug/debugStringConvertibleUtils.h>
namespace facebook {
namespace react {
RawTextProps::RawTextProps(
const RawTextProps &sourceProps,
const RawProps &rawProps)
: Props(sourceProps, rawProps),
text(convertRawProp(rawProps, "text", sourceProps.text, {})){};
#pragma mark - DebugStringConvertible
#if RN_DEBUG_STRING_CONVERTIBLE
SharedDebugStringConvertibleList RawTextProps::getDebugProps() const {
return {debugStringConvertibleItem("text", text)};
}
#endif
} // namespace react
} // namespace facebook