DEV Community

Discussion on: React vs Vue: Compare and Contrast

Collapse
 
sergiodxa profile image
Sergio Daniel Xalambrí

Redux is not part of React, and is not even recommended in the website, neither it's recommended by the team.

But yeah, React has some opinions on how to build UIs, that includes how to define the UI (JSX) and how to control the state of your UI (top down data passing, useState/useReducer) and how to run effects. Nevertheless, aside of that it's completely un opinionated, it doesn't care how you style your components, how you fetch data, how you manager routes, not even how you animate, that is why there are libs for those things instead of being part of React itself.

Thread Thread
 
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?