DEV Community

loading...

Discussion on: React vs Vue: Compare and Contrast

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?