Skip to content
Merged
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
17 changes: 3 additions & 14 deletions example/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,9 @@ const DEBUG_SCROLLABLE = false;

// Enabling this prop fixes input flickering while auto growing.
// However, it's still experimental and not tested well.
const ANDROID_EXPERIMENTAL_SYNCHRONOUS_EVENTS = true;
// Disabled for now, as it's causing some strange issues.
// See: https://github.com/software-mansion/react-native-enriched/issues/229
const ANDROID_EXPERIMENTAL_SYNCHRONOUS_EVENTS = false;

export default function App() {
const [isChannelPopupOpen, setIsChannelPopupOpen] = useState(false);
Expand All @@ -80,10 +82,6 @@ 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 @@ -264,7 +262,6 @@ export default function App() {
<View style={styles.editor}>
<EnrichedTextInput
ref={ref}
key={key}
mentionIndicators={['@', '#']}
style={styles.editorInput}
htmlStyle={htmlStyle}
Expand Down Expand Up @@ -299,14 +296,6 @@ 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