How to convert HTML Template to React Js Template

In this Post I am explains about Basic HTML template to React Js Template conversion.

First you need to install sample React Js Project using below command.

npx create-react-app html-to-react-app

Take your HTML template (I downloaded My HTML template from https://templated.co/industrious).

Create two folders “src/assets” and “public/assets” in your react project.

Copy all your HTML template js files to “public/assets” folder.

Copy all your HTML template assets (Except js files) to “src/assets” folder.

Remove all the content in “App.css” and import all your css files in “App.css” using “@import” statement.

Import all your scripts to “public/index.html” file using script tag (http://abc.js)

In App.js Write below code.

return (
/* Your Template index.html code */
);

Remove all HTML comments.
Close all self closed tags properly.
change all “class” attributes to “className”

Thank you..

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Create your website with WordPress.com
Get started
%d bloggers like this: