DEV Community

Converting static HTML/CSS site to React App

Menard Maranan on August 11, 2021

Quick Note: We only focus on the simpler use case here πŸ˜‰ Thanks for the responses πŸ™‚ Converting a static page or site into React App can be simpl...
Collapse
 
yodasoda profile image
Jan Claasen • Edited

Great post for learning but I wouldn't recommend doing this from a practical perspective. You'll need a good reason why you would want to have your static site converted. I am really struggling to think of enough reasons to do this. And in most cases a simple templating language alongside of something like jekyll/hugo/11ty would be a way better solution.

Collapse
 
oenonono profile image
Junk

Great question. Unless there's a reason to need React, all this will do is make the site perform worse without adding any value.

Collapse
 
menard_codes profile image
Menard Maranan

Thanks for the response! I also am thinking of the same thing, just there are some who have requested me in the past to do this, maybe they have a better reason, so yeah, I answered the demand πŸ˜…

Collapse
 
yodasoda profile image
Jan Claasen

As my friends at Jurassic park said: "they were more preoccupied with whether they could, they didn't stop to think if they should."

Collapse
 
creativemacmac profile image
creativemacmac

This is SO useful❀️thanks a milπŸ’ͺπŸ™‚ i have a gazillion tailwind liberaries and some only have html available and i get it wrong sooooo many times when converting to react... I have noticed that react doesnt seem to like html section tag...am i right or am i Just paranoid? πŸ™‚

Collapse
 
menard_codes profile image
Menard Maranan

I'm glad you found this helpful😊, appreciate it much!
Btw, I don't think you're alone with that, JSX can be a pain at timesπŸ˜…

Collapse
 
creativemacmac profile image
creativemacmac

I am glad to hear that i am not the only person finding converting from html to jsx hard because i create some massive bugs and my buggy brain doesnt help much πŸ˜†πŸ˜‚

Thread Thread
 
menard_codes profile image
Menard Maranan

πŸ˜‚πŸ˜‚

Collapse
 
akash_stha01 profile image
akash shrestha

svelte is useful

Collapse
 
aalphaindia profile image
Pawan Pawar

Good one!

Collapse
 
manasak98 profile image
manasak98

Hey, Pawan very useful post on drupal.
BTW I am just 3 months old to drupal.
So I am facing issue... Like I want to create configuration form in drupal 7.
Do you know how to do that?
Please help me out of you know.
Thank you.

Collapse
 
aalphaindia profile image
Pawan Pawar

Please contact us at contact@aalpha.net

Thread Thread
 
manasak98 profile image
manasak98

i just mailed to this my query.can you please check that out.

Collapse
 
menard_codes profile image
Menard Maranan

LOL! I agree, especially if the site is more complex. This is just the simplest example I came up with πŸ˜…

Collapse
 
arvindpdmn profile image
Arvind Padmanabhan

BTW, sometimes static sites are just what you need: devopedia.org/static-site-generators

Collapse
 
menard_codes profile image
Menard Maranan • Edited

Yes, and it's especially preferable the speed of static sites. But I think those who might need this conversion have their reasons, like they want to migrate their site to React maybe for more client facing app and less involvement of the backend or whatever. I heared some folks just adheres to client's needs to convert their site to React, and idk from them.
Anyway, thanks for an awesome responseπŸ˜‰

Collapse
 
anurag_sharma_aa91f11c78e profile image
Anurag sharma

Guys I have made one website and now i want to migrate it into the react , is there any tool available in the market which can help me