Its easy to render markdown data via react-markdown
module. But I cant implement render all *.md
files via custom MarkdownPage
component:
<Route path="*.md" component={MarkdownPage} />
but route didn't work and *.md
-files open in browser as-is.
I'm expecting that this file will be provided as a data to component via props
, to do something like:
render() {
return (
<h1>Pretty markdown</h1>
<Page>
<ReactMarkdown source={this.props} />
</Page>
);
}
How could I achieve this?