Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You only really need a build step to use JSX, which is strictly speaking optional.


Technically you don't even need react, you can do it all in javascript!

Joking aside, you really do need to solve the problems jsx solves, but also webpack, next.js, react-router and depending on your application, something like mantine or tailwind. These are the minimum I think.

If you have a smallish project you can get by hand-rolling your own solutions, but it doesn't make the problems themselves go away.

In fact, it is exactly the claim in this thread that there are a lot of beaten paths in backend languages with relative stability over time, whereas in frontend it is 1) not clear what the beaten path is (there isn't one) and 2) when there appears to be favored solution, it often changes radically or disappears after just a couple of years.

For example, create-react-app used to be the default way to start a react app, it is now deprecated. But for python, Django has been a stable beaten path for many, many years. Same for Rails. C# also tends to change every couple of years, but there is always just one single Microsoft recommended way to do things.

Sure there are many experimental libraries and contenders in these languages as well, but there isn't really anything with the same maturity and stability in frontend.


This is true (and part of why I love React/JSX) but in practice nobody writes JSX by hand.


Isn't it the other way around, nobody writes React by hand they all use JSX?


You're right :)


you can always just do:

    <script src="react.js">
    <script src="react-dom.js">
    <script> 
    const recognition = undefined
    var foo = document.querySelector("#foo")
    let bar = ReactDOM.createRoot(foo)
    foo.innerHTML = bar.render("<b>eyond<a>ll{recognition}");
    </script>




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: