DEV Community

Discussion on: Why choose React for frontend?

Collapse
 
pengeszikra profile image
Peter Vivo

In my opinion React greatest advantage is simple state handling. No one else can modify state, just action. That really simplify the software debugging, because most of the time enough check the state.

Second one is JSX, that is depend on pure JS and I can use any possibilities of modern ES6+. Really don't need to write any other files in project just JS files.
(in real case, we use scss and glsl files too).

Our html file is this:

<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>appercell</title>
</head>
<body>
  <div id="appercell"></div>
  <script src="./index.js"></script>  
</body>
</html>
Enter fullscreen mode Exit fullscreen mode

In our really complex single page medical science application FE side written in react, hold 10k+ line of code, and react help keep our code well organised. Component reusability also true. Plus we can write a whole Component in a single arrow function ... really handy.

In this project shows me, the simple useState + useSagaReducer without redux or useContext is very useful even complex application.