This is my project
I don’t understand why it doesn’t work on codepen, it works perfectly on my machine with npm start
Here is the project on github:
https://github.com/fez994/react-markdown-previewer.
Your TextArea component is a functional component, so there’s no need for render(). Just return the JSX directly.
const TextArea = () => {
/* State initialization code, event handlers, etc. */
// there should be no render() here!
return (
<div className="App">
{/* ... */}
</div>
)
}
-
Move the link to
react-markdownbelow the links to react/react-dom -
Call useState on the React object
React.useState() -
As said, remove the render method surrounding the return.