Skip to content

Commit 26882f0

Browse files
author
Dimitri KOPRIWA
authored
Fix: remove usage of getUniqueId
I still can't use it yet but since I am trying to make it work, I have found this was not explained nor necessary as there is a `node.key` for that job.
1 parent a997c5e commit 26882f0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -872,19 +872,19 @@ Rules are used to specify how you want certain elements to be displayed. The exi
872872
import React from 'react';
873873
import { SafeAreaView, ScrollView, StatusBar, Text } from 'react-native';
874874

875-
import Markdown, {getUniqueID} from 'react-native-markdown-display';
875+
import Markdown from 'react-native-markdown-display';
876876

877877
const rules = {
878878
heading1: (node, children, parent, styles) =>
879-
<Text key={getUniqueID()} style={[styles.heading, styles.heading1]}>
879+
<Text key={node.key} style={[styles.heading, styles.heading1]}>
880880
>> H1 TEXT HERE >> "{children}"
881881
</Text>,
882882
heading2: (node, children, parent, styles) =>
883-
<Text key={getUniqueID()} style={[styles.heading, styles.heading2]}>
883+
<Text key={node.key} style={[styles.heading, styles.heading2]}>
884884
>> H2 TEXT HERE >> "{children}"
885885
</Text>,
886886
heading3: (node, children, parent, styles) =>
887-
<Text key={getUniqueID()} style={[styles.heading, styles.heading3]}>
887+
<Text key={node.key} style={[styles.heading, styles.heading3]}>
888888
>> H3 TEXT HERE >> "{children}"
889889
</Text>,
890890
};

0 commit comments

Comments
 (0)