i am looking into ways to automate the manual process of converting the HTML templates into React components ,Please suggest any method
Asked
Active
Viewed 2,891 times
2
-
1Possible duplicate of [Rendering raw html with reactjs](https://stackoverflow.com/questions/27934238/rendering-raw-html-with-reactjs) – Bhojendra Rauniyar Oct 08 '18 at 04:19
-
1what about `dangerouslySetInnerHTML`? – Bhojendra Rauniyar Oct 08 '18 at 04:21
1 Answers
4
Reactjs.net provides an online utility to convert html to jsx. https://magic.reactjs.net/htmltojsx.htm
You can specify the name of the component as well.
Alternatively, you can look for a node module that does this conversion. I haven't tried them personally. Here's one of them. https://www.npmjs.com/package/htmltojsx

Sorter
- 9,704
- 6
- 64
- 74
-
Sorter-thanks for your response does this module helps me to create react components also or just converts to JSX – Ayesha Oct 08 '18 at 04:58