How to convert a html template to react?

Ninja picture Ninja · Nov 18, 2017 · Viewed 34.9k times · Source

I have purchased an HTML admin template from themeforest (https://themeforest.net/item/limitless-responsive-web-application-kit/13080328?s_rank=1).

I am building a MERN stack site, and wondering what would be the best way to convert this HTML template to a react site. Breaking down the template to components, adding routes manually, and converting HTML to JSX etc seems to be a tedious task.

The question arises because in themeforest, the most popular admin templates were built for a jQuery / HTML world, not for a full stack JS world. For example, the theme that I've linked above has ~7000 downloads. These templates upon purchase give you a whole bunch of HTML and CSS, and if we have to build a react site out of these, then manually converting the HTML to JSX, and breaking it down to componenets, is a laborious process. Wondering if there's a better approach to solving this problem.

Answer

Mritunjay Upadhyay picture Mritunjay Upadhyay · Oct 22, 2018

You can use html-to-react-components

A better approach would be converted your html to jsx and use in your react-component. You can converted your html to jsx here.