File tree Expand file tree Collapse file tree 2 files changed +26
-9
lines changed
android/src/main/new_arch Expand file tree Collapse file tree 2 files changed +26
-9
lines changed Original file line number Diff line number Diff line change @@ -39,15 +39,19 @@ target_link_libraries(
3939 ReactAndroid::reactnative
4040)
4141
42- target_compile_options (
43- ${LIB_TARGET_NAME}
44- PRIVATE
45- -DLOG_TAG=\"ReactNative\"
46- -fexceptions
47- -frtti
48- -Wall
49- -std=c++20
50- )
42+ if (ReactAndroid_VERSION_MINOR GREATER_EQUAL 80)
43+ target_compile_reactnative_options(${LIB_TARGET_NAME} PRIVATE )
44+ else ()
45+ target_compile_options (
46+ ${LIB_TARGET_NAME}
47+ PRIVATE
48+ -DLOG_TAG=\"ReactNative\"
49+ -fexceptions
50+ -frtti
51+ -Wall
52+ -std=c++20
53+ )
54+ endif ()
5155
5256target_include_directories (
5357 ${CMAKE_PROJECT_NAME}
Original file line number Diff line number Diff line change @@ -80,6 +80,10 @@ export default function App() {
8080 const [ currentLink , setCurrentLink ] =
8181 useState < CurrentLinkState > ( DEFAULT_LINK_STATE ) ;
8282
83+ const [ key , setKey ] = useState ( 0 ) ;
84+ const incrementKey = ( ) => setKey ( ( v ) => v + 1 ) ;
85+ const collectGarbage = ( ) => global . gc ?.( ) ;
86+
8387 const ref = useRef < EnrichedTextInputInstance > ( null ) ;
8488
8589 const userMention = useUserMention ( ) ;
@@ -259,6 +263,7 @@ export default function App() {
259263 < Text style = { styles . label } > Enriched Text Input</ Text >
260264 < View style = { styles . editor } >
261265 < EnrichedTextInput
266+ key = { key }
262267 autoFocus
263268 ref = { ref }
264269 mentionIndicators = { [ '@' , '#' ] }
@@ -295,6 +300,14 @@ export default function App() {
295300 < Button title = "Focus" onPress = { handleFocus } style = { styles . button } />
296301 < Button title = "Blur" onPress = { handleBlur } style = { styles . button } />
297302 </ View >
303+ < View style = { styles . buttonStack } >
304+ < Button
305+ title = "Bump key"
306+ onPress = { incrementKey }
307+ style = { styles . button }
308+ />
309+ < Button title = "GC" onPress = { collectGarbage } style = { styles . button } />
310+ </ View >
298311 < Button
299312 title = "Set input's value"
300313 onPress = { openValueModal }
You can’t perform that action at this time.
0 commit comments