EN
Markdown - how to make blocks of React code (syntax highlighting - github, dev.to)
3
points
In this article, we would like to show you how to create blocks of React code with syntax highlighting in markdown.
To create a block of React code with syntax highlighting you need to wrap your code with three backticks (```
) and tell markdown it's JSX in the first line right after backticks.
Practical example:
```jsx
import React from "react";
const App = () => {
return (
<div>
<h1>My App</h1>
</div>
);
};
export default App;
```
Result from github.com:
Result from dev.to: