How to convert a html template to react?

橙三吉。 提交于 2019-12-03 09:08:26

问题


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.


回答1:


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.




回答2:


You can use:

  1. html-to-react
  2. wix/react-templates

In the long run however, it is better if you can split out these templates into a granular set of components with well defined roles.




回答3:


http://www.htmltoreact.com here you can convert your html syntax into jsx(reactjs) syntax.



来源:https://stackoverflow.com/questions/47370369/how-to-convert-a-html-template-to-react

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!