New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
So, tried it, doesn't work. My code and the error are below. #1
Comments
I had this working the other day on a project I was working on, so I know it works. I’ll take a look tomorrow when I get a chance.
It uses the fetch api, so the file name I think is more a url. Otherwise, you could “import readme from ‘./somefile.md’;” and then pass readme to the md prop rather than filename.
For reference here is the actual JSX file (https://github.com/gazzwi86/react-md-file/blob/master/src/react-md-component.jsx).
… On 6 Dec 2018, at 01:20, Greg Brewton ***@***.***> wrote:
/** App.js */
import React, { Component } from "react";
import "./App.css";
import AppRouter from "./components/appRouter/AppRouter";
import ReactMd from 'react-md-file';
class App extends Component {
render() {
return (<main id="app-wrapper">
<AppRouter/>
<ReactMd fileName="README.md"/>
</main>);
}
}
export default App;
index.js:1452 Warning: validateDOMNesting(...): Whitespace text nodes cannot appear as a child of <html>. Make sure you don't have any extra whitespace between tags on each line of your source code.
I first tried using it with a relative path to the README.md file which is a level above App.js, as in all Create-React-App projects. That didn't work, so I copied README.md to the /src directory and that didn't work. I think what you're making here is a great idea and incredibly useful - in theory anyway - and I'd love to see it work. If I understood a little more about how, I'd be offering a solution.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@Bus42 did you have any luck with the above suggestions? |
I honestly have had no time between work and freelancing to do anything
with my own projects but as soon as I get a chance I'll give it a shot.
…On Sun, Dec 9, 2018, 8:47 PM Gareth Williams ***@***.*** wrote:
@Bus42 <https://github.com/Bus42> did you have any luck with the above
suggestion?
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ATGDQfWfRFS1JrQ55oKrcIh4ATrYhPPzks5u3dllgaJpZM4ZDMax>
.
|
@Bus42 you have to put the readme file in the public folder then use ReactMd fileName="./readme.md" |
Thx 👍
…On Wed, Jul 10, 2019, 6:52 PM Luis Sanchez ***@***.***> wrote:
@Bus42 <https://github.com/Bus42> you have to put the readme file in the
public folder then use
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#1?email_source=notifications&email_token=AEYYGQOAIFNG6TXBGDHMYC3P6Z74TA5CNFSM4GIMY2Y2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZVE4RA#issuecomment-510283332>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AEYYGQJG44XRVYOS5UWU7TLP6Z74TANCNFSM4GIMY2YQ>
.
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
index.js:1452 Warning: validateDOMNesting(...): Whitespace text nodes cannot appear as a child of <html>. Make sure you don't have any extra whitespace between tags on each line of your source code.
I first tried using it with a relative path to the README.md file which is a level above App.js, as in all Create-React-App projects. That didn't work, so I copied README.md to the /src directory and that didn't work. I think what you're making here is a great idea and incredibly useful - in theory anyway - and I'd love to see it work. If I understood a little more about how, I'd be offering a solution.
The text was updated successfully, but these errors were encountered: