mientjan / react-native-markdown-renderer

React Native 100% compatible CommonMark renderer
MIT License
424 stars 418 forks source link

Type for children #174

Open sokolovdm opened 1 year ago

sokolovdm commented 1 year ago

How to solve problem with type children

export const DocumentationView = React.memo<DocumentationViewProps>(
    ({ testID = 'DocumentationView', style, data }) => {
        const styles = createStyles()
        return (
            <View style={[styles.root, style]} testID={testID}>
                <Markdown style={markdownStyles}>{data}</Markdown>
            </View>
        )
    },
)

TS2559: Type '{ children: any; }' has no properties in common with type 'IntrinsicAttributes & MarkdownProps'.