#react #nextjs #typescript
Last updated on Apr 12, 2020 by Suraj Sharma
I have been working on React for more than a year now. One day I thought of redesigning my blog using React and Typescript but React has a major problem in terms of SEO, because of client-side rendering, search engines' bot are unable to scrape content from websites resulting in zero organic views.
I have read about React frameworks Nextjs and Gatsby before, they are static site generators on the build time, which means the website has static HTML and CSS files with fully loaded content from the server itself, unlike React where contents are generated on the client-side that is not the best option for blog websites.
Yes, Nextjs has the support for TypeScript
I kick started my project with Material UI's nextjs-with-typescript example.
The choice was easy: Markdown🏆
Opensource projects like Babel, Nextjs and many other projects use Markdown files to create their blog posts so the choice was clear, then came how to render markdown files to JSX?
For the time being, I'm using the markdown-to-JSX library (I might migrate to MDX in future because of its capabilities to import react components on markdown files and later embed them on jsx files to demonstrate live examples).
PS: I have a GitHub repository where I push all the posts of this blog. If you find any mistake on my posts, please feel free to raise an issue or a pull request.
Rate this post
Suraj Sharma is a Full Stack Software Engineer. He holds a B.Tech degree in Computer Science & Engineering from NIT Rourkela.