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

You are complaining about the libraries around it rather than react itself.

    function MyForm() {
      const [isHidden, setIsHidden] = useState(false)
      return (
        <>
          <button onClick={()=>setIsHidden(!isHidden)}>{isHidden ? ‘Show’ : ‘Hide’}</button>
          {!isHidden &&<form>your same stuff</form>}
        </>
      )
    }
As you can see, you’ll be writing less code than you’d write if you were using something like jQuery. At the same time, if you’re needs grow due to something like client-side validation, you at least have an easy path forward.

At it’s core, React isn’t very complex and you can build a lot of stuff without much complexity.

The problem I often see is developers overengineering stuff. It’s not react specific and you’ll find this issue everywhere, but the form it takes in react land is adding massive solutions to little problems. I’ve worked on apps with giant routing solutions for a handful of routes or complicated stores with almost nothing in them.

I suspect tech influencers and those of us writing actually large apps have an outsized voice if only because those devs keeping simple react projects simple just don’t have that much to write about.



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

Search: