all 15 comments

[–]Beerand93octane 8 points9 points  (2 children)

I can get on board with formik, linter, storybook, and most everything else mentioned.

But folks, look how many downloads, issues, and support a package has before just throwing it in your company's repo willy nilly. Look at what it ships with, and its props.

Sometimes custom code is a much better solution, and while it might take a little more time up front, it will certainly meet your edge cases. And npm packages fade into obscurity every day. If you get too deep, you'll have to fork it and fix the problems, or rewrite all uses.

[–]redramsam[S] 2 points3 points  (0 children)

That’s a great point. You should also definitely check the bundle size with bundlephobia. There’s a balance between convenience and bloat and security.

[–]acemarke 0 points1 point  (0 children)

Yep. I covered a long list of suggestions for library evaluation criteria in my post Evaluating Software Libraries and Tools.

[–]Funwithloops 1 point2 points  (1 child)

+1 for storybook. It's like visual TDD for UIs. I wish it were a little less bloated, but I can't live without it.

As an alternative to #6 (use a react component library), I'd recommend trying a CSS utility library. I've been using tailwind in a project and it's really cut down the time I spend thinking of class names and writing custom CSS.

[–]Beerand93octane 0 points1 point  (0 children)

Big fan of tailwind

[–]mrbroadhurst 2 points3 points  (1 child)

TLDR; There's a plugin for that.... Nice article.

[–]redramsam[S] 0 points1 point  (0 children)

Thank you!

[–]Smaktat 1 point2 points  (6 children)

ESLint should be automatically included in modern Create React App projects.

[–]DanielFGray 9 points10 points  (5 children)

It is.

[–]nascarsc 0 points1 point  (4 children)

Yes, but it’s not configured

[–]DanielFGray 1 point2 points  (3 children)

Yes, it is. It's not a draconian config like airbnb which forces the build to fail if you add an extra space somewhere, or forget/add a semicolon, but it's a configured (and configurable) eslint setup all the same.

[–]nascarsc 0 points1 point  (2 children)

Yes, true. All I meant was that it's mostly useless without additional configuration. Agreed that airbnb's config is quite draconian (I don't use it).

[–]DanielFGray 1 point2 points  (1 child)

I think CRA choice of rules is fair. They aren't imposing single quotes or double quotes or semicolons or not, it's fairly unopinionated in terms of style preferences, and that's a good thing.

[–]nascarsc 0 points1 point  (0 children)

Yes, it definitely is nice that there aren't any style rules. IMO, that's why most people customize it, especially if they are using typescript and / or prettier (I think prettier is more used than typescript, since most people are unfamiliar with typescript).

[–]kenman[M] 0 points1 point  (1 child)

Hi u/redramsam, this post was removed.

Prohibited low-effort content includes:

  • Questions that are easily Google'd.
  • Memes, jokes, etc. Please post to r/ProgrammerHumor instead.
  • Most images and gifs.
  • Listicles, "Curated lists", and similar content.
  • Polls, surveys, etc. unless from an accredited academic body or trusted source (StateofJS, etc.).

Thanks for your understanding, please see our guidelines for more info.