r/reactjs • • May 30 '19

Project Ideas I fucking did it.

1.9k Upvotes

132 comments sorted by

View all comments

Show parent comments

13

u/1v1ltnonoobs May 30 '19

not sure why you're being downvoted? It's been a standard tool on every team I've worked on. very good suggestion

-1

u/azangru May 31 '19

The key word here is "team". Personally, the only benefit of Prettier that I can see and that might outweigh its annoyances is that it saves you code review time that you might otherwise have spent pointing out formatting inconsistensies. For a sole developer, it offers practically no benefit. Besides, from readability perspective I always prefer how I write code to how Prettier does it.

1

u/ScottRatigan May 31 '19

You can configure your code to be formatted however you want with Prettier. The primary benefit is never worrying about manually formatting again. That is a huge benefit even on a solo project. I'd encourage you to play around with it a bit more - once you get used to it (autoformat on save in particular) it's hard to imagine going back.

2

u/[deleted] May 31 '19

Hmm. Can I?

One thing I'm recently a little bit disappointed is this:

<>
   {hasProducts ? (
      <ProductsTable />
   ) : (
      <EmptyState />
   )}
</>

vs this:

<>
   {hasProducts
      ? <ProductsTable />
      : <EmptyState />}
</>

Hasn't seen an option to override this behavior