DEV Community

loading...

Discussion on: React vs Vue: Compare and Contrast

jwp profile image
John Peters

When I first learned the top down data model and state stuff, I didn't like react. Then I found they altered Css and renamed tags like link.

Thread Thread
aarongarciah profile image
Aarón García Hervás

What do you mean by "they altered CSS"?

Thread Thread
jwp profile image
John Peters • Edited
render() {
  let className = 'menu';
  if (this.props.isActive) {
    className += ' menu-active';
  }
  return <span className={className}>Menu</span>
}

Instead of this:

   //where the style sheet is contains the className style 
  <span class="className">Menu</span>

When I first read about this many years ago I did not like it. I didn't understand it at the time.

Thread Thread
aarongarciah profile image
Aarón García Hervás

I'd say that's "altered HTML" (JSX), but no CSS has been altered, right?