Skip to content

Commit 7a6880a

Browse files
authored
chore: drop RN 0.79 and RN 0.80 support (#390)
# Summary In order to make development easier this PR drops support for RN 0.79 and RN 0.80 which are no longer supported by RN core. ## Test Plan Ensure lib builds and works correctly in RN >= 0.81 ## Screenshots / Videos n/a ## Compatibility | OS | Implemented | | ------- | :---------: | | iOS | ❌ | | Android | ✅ |
1 parent 662c917 commit 7a6880a

3 files changed

Lines changed: 4 additions & 36 deletions

File tree

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ We can help you build your next dream product –
4141
## Prerequisites
4242

4343
- `react-native-enriched` currently supports only Android and iOS platforms
44-
- It works only with [the React Native New Architecture (Fabric)](https://reactnative.dev/architecture/landing-page) and supports following React Native releases: `0.79`, `0.80`, `0.81`, `0.82`, `0.83` and `0.84`.
44+
- It works only with [the React Native New Architecture (Fabric)](https://reactnative.dev/architecture/landing-page) and supports following React Native releases: `0.81`, `0.82`, `0.83` and `0.84`.
45+
- If you would like to use `react-native-enriched` in React Native `0.79` or `0.80` use `react-native-enriched 0.4.x`.
4546

4647
## Installation
4748

android/src/main/new_arch/CMakeLists.txt

Lines changed: 1 addition & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -45,19 +45,7 @@ target_link_libraries(
4545
ReactAndroid::reactnative
4646
)
4747

48-
if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 80)
49-
target_compile_reactnative_options(${LIB_TARGET_NAME} PRIVATE)
50-
else()
51-
target_compile_options(
52-
${LIB_TARGET_NAME}
53-
PRIVATE
54-
-DLOG_TAG=\"ReactNative\"
55-
-fexceptions
56-
-frtti
57-
-Wall
58-
-std=c++20
59-
)
60-
endif()
48+
target_compile_reactnative_options(${LIB_TARGET_NAME} PRIVATE)
6149

6250
target_include_directories(
6351
${CMAKE_PROJECT_NAME}
Lines changed: 1 addition & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,10 @@
11
#pragma once
22

33
#include <folly/dynamic.h>
4+
#include <react/renderer/components/FBReactNativeSpec/Props.h>
45
#include <react/renderer/components/ReactNativeEnrichedSpec/Props.h>
56
#include <react/renderer/core/propsConversions.h>
67

7-
#if REACT_NATIVE_MINOR_VERSION >= 81
8-
#include <react/renderer/components/FBReactNativeSpec/Props.h>
9-
#else
10-
#include <react/renderer/components/rncore/Props.h>
11-
#endif
12-
138
namespace facebook::react {
149

1510
#ifdef RN_SERIALIZABLE_STATE
@@ -27,22 +22,6 @@ inline folly::dynamic toDynamic(const EnrichedTextInputViewProps &props) {
2722

2823
return serializedProps;
2924
}
30-
#elif REACT_NATIVE_MINOR_VERSION >= 79
31-
inline folly::dynamic toDynamic(const EnrichedTextInputViewProps &props) {
32-
folly::dynamic serializedProps = folly::dynamic::object();
33-
serializedProps["defaultValue"] = props.defaultValue;
34-
serializedProps["placeholder"] = props.placeholder;
35-
serializedProps["fontSize"] = props.fontSize;
36-
serializedProps["fontWeight"] = props.fontWeight;
37-
serializedProps["fontStyle"] = props.fontStyle;
38-
serializedProps["fontFamily"] = props.fontFamily;
39-
serializedProps["lineHeight"] = props.lineHeight;
40-
// Ideally we should also serialize htmlStyle, but toDynamic function is not
41-
// generated in this RN version
42-
// As RN 0.79 and 0.80 is no longer supported, we can skip it for now
43-
44-
return serializedProps;
45-
}
4625
#endif
4726

4827
} // namespace facebook::react

0 commit comments

Comments
 (0)