Skip to content
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

Open
Bus42 opened this issue Dec 5, 2018 · 5 comments
Open

So, tried it, doesn't work. My code and the error are below. #1

Bus42 opened this issue Dec 5, 2018 · 5 comments

Comments

@Bus42
Copy link

Bus42 commented Dec 5, 2018

/** 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.

@gazzwi86
Copy link
Owner

gazzwi86 commented Dec 6, 2018 via email

@gazzwi86
Copy link
Owner

gazzwi86 commented Dec 10, 2018

@Bus42 did you have any luck with the above suggestions?

@Bus42
Copy link
Author

Bus42 commented Dec 10, 2018 via email

@luisSanchezCruz
Copy link

luisSanchezCruz commented Jul 11, 2019

@Bus42 you have to put the readme file in the public folder then use ReactMd fileName="./readme.md"

@Bus42
Copy link
Author

Bus42 commented Jul 31, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants