Skip to content
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
22 changes: 13 additions & 9 deletions android/src/main/new_arch/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,19 @@ target_link_libraries(
ReactAndroid::reactnative
)

target_compile_options(
${LIB_TARGET_NAME}
PRIVATE
-DLOG_TAG=\"ReactNative\"
-fexceptions
-frtti
-Wall
-std=c++20
)
if(ReactAndroid_VERSION_MINOR GREATER_EQUAL 80)
target_compile_reactnative_options(${LIB_TARGET_NAME} PRIVATE)
else()
target_compile_options(
${LIB_TARGET_NAME}
PRIVATE
-DLOG_TAG=\"ReactNative\"
-fexceptions
-frtti
-Wall
-std=c++20
)
endif()

target_include_directories(
${CMAKE_PROJECT_NAME}
Expand Down
13 changes: 13 additions & 0 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,10 @@ export default function App() {
const [currentLink, setCurrentLink] =
useState<CurrentLinkState>(DEFAULT_LINK_STATE);

const [key, setKey] = useState(0);
const incrementKey = () => setKey((v) => v + 1);
const collectGarbage = () => global.gc?.();

const ref = useRef<EnrichedTextInputInstance>(null);

const userMention = useUserMention();
Expand Down Expand Up @@ -259,6 +263,7 @@ export default function App() {
<Text style={styles.label}>Enriched Text Input</Text>
<View style={styles.editor}>
<EnrichedTextInput
key={key}
autoFocus
ref={ref}
mentionIndicators={['@', '#']}
Expand Down Expand Up @@ -295,6 +300,14 @@ export default function App() {
<Button title="Focus" onPress={handleFocus} style={styles.button} />
<Button title="Blur" onPress={handleBlur} style={styles.button} />
</View>
<View style={styles.buttonStack}>
<Button
title="Bump key"
onPress={incrementKey}
style={styles.button}
/>
<Button title="GC" onPress={collectGarbage} style={styles.button} />
</View>
<Button
title="Set input's value"
onPress={openValueModal}
Expand Down
Loading