DEV Community

Discussion on: I Created My Portfolio with React and Some Magic 🎉

Collapse
 
booligoosh profile image
Ethan

I love the cool idea of different themes! 😍

However, I feel like React is just overused for everything these days. Couldn't you have just applied CSS based on different classes for the

and then changed it with a few lines of JavaScript??
Collapse
 
flexdinesh profile image
Dinesh Pandiyan • Edited

If we went through different css classes approach, then everytime we add or remove a new theme, then we would need to make changes through the entire codebase and chances are we could easily miss a few spots and wouldn't notice it at all until someone points it out. This seemed like the easier way to theme it.

Collapse
 
aravindballa profile image
Aravind Balla

We can use css variables to theme things.

codepen.io/aravindballa/pen/XEpZbr

It is not supported in IE11 though!