Skip to content

Commit 000d7d9

Browse files
committed
refactoring example code
1 parent 6b406e0 commit 000d7d9

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

example/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
node_modules/
22
.expo/
33
npm-debug.*
4+
/package-lock.json

example/App.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from 'react';
22
import { StyleSheet, Text, View, ScrollView } from 'react-native';
3-
import Markdown from 'react-native-markdown-renderer';
4-
import { AstRenderer, style, defaultRenderFunctions, PluginContainer, blockPlugin } from '../index';
3+
import Markdown, { AstRenderer, style, defaultRenderFunctions, PluginContainer, blockPlugin } from 'react-native-markdown-renderer';
54

65
const markdownText = `
76
# Syntax Support
@@ -163,7 +162,6 @@ With a reference later in the document defining the URL location:
163162
164163
[id]: https://octodex.github.com/images/dojocat.jpg "The Dojocat"
165164
`;
166-
167165
/**
168166
* i'm overriding the default h1 render function.
169167
*/
@@ -189,7 +187,7 @@ export default class App extends React.Component {
189187
<ScrollView>
190188
<Text>Markdown</Text>
191189
<Text>--------</Text>
192-
<Markdown plugins={[]} children={markdownText2} />
190+
<Markdown plugins={[]} children={markdownText} />
193191
</ScrollView>
194192
</View>
195193
);

0 commit comments

Comments
 (0)