Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to convert a html template to react? [closed]

Tags:

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.

like image 878
Ninja Avatar asked Nov 18 '17 19:11

Ninja


People also ask

Can HTML templates be used for React projects?

Go to your react project public folder and create a new folder called assets and paste all the copied folders inside this. Step 5. Open the index. html file from HTML template folder in any editor and copy the entire content inside tag.

How do I convert HTML to JSX?

You can use https://magic.reactjs.net/htmltojsx.htm which is an online HTML to JSX compiler. Show activity on this post. You can also use https://transform.tools/html-to-jsx beside https://magic.reactjs.net/htmltojsx.htm as mentioned above. Show activity on this post.


1 Answers

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.

like image 69
Mritunjay Upadhyay Avatar answered Sep 30 '22 19:09

Mritunjay Upadhyay