Rendering Markdown in React

Download dependency. yarn add react-markdown yarn add remark-gfm yarn add rehype-raw yarn add react-syntax-highlighter yarn add github-markdown-css Use fetch to fetch the contents of a Markdown file and render it using react-markdown. import React from ‘react’; import ReactMarkdown from ‘react-markdown’; const App=({url})=>{ const [mdContent, setMdContent] = useState(”) useEffect(() => { Read more…

React Router v6.4

In v6.4, new routers were introduced that support the new data APIs: createBrowserRouter createMemoryRouter createHashRouter The following routers do not support the data APIs: <BrowserRouter> <MemoryRouter> <HashRouter> <NativeRouter> <StaticRouter> This is the recommended router for all React Router web projects. It uses the DOM History API to update the URL and manage Read more…