markerikson / react-community-tools-practices-cheatsheet

Descriptions and use cases for common tools and practices in the React community
https://react-community-tools-practices-cheatsheet.netlify.app/
328 stars 13 forks source link

Add "Maintaining state that could be derived state" #20

Closed RicheyRyan closed 2 years ago

RicheyRyan commented 2 years ago

Hey, so I'm finally getting some time for this and I figured I'd contribute to the mistakes and the glossary. My plan is to contribute bit by bit when I have a spare moment at work. I don't get into adding any particular structure as suggested in #13 . I reckon we can start worrying about that when we have a number of items.

I wanted to give a real-world example without getting too much into the nitty-gritty of a particular scenario. Let me know what you think could be improved.

netlify[bot] commented 2 years ago

Deploy Preview for react-community-tools-practices-cheatsheet ready!

Name Link
Latest commit 21f24cdff3e7ef6f122285cf26ccbcd558970b13
Latest deploy log https://app.netlify.com/sites/react-community-tools-practices-cheatsheet/deploys/6283c822965f180008bb5f23
Deploy Preview https://deploy-preview-20--react-community-tools-practices-cheatsheet.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

RicheyRyan commented 2 years ago

I realized that the mistakes were on mistakes1. I reckon we should go with a single top-level page at /common-mistakes for now and figure out how to break it down later. If you prefer to do something different, I can either do it now or revert. Once this is done I plan to just open a stream of additional PRs. I have a couple items queued in Grammarly already 🙂

markerikson commented 2 years ago

Sure, let's get this in. I'll be honest and say I'm not sure this is exactly a match for the kind of content I've been picturing in my head (maybe I mentioned something like this in the initial thread? can't remember where "common mistakes" came in. oh, I see, probably here: https://github.com/markerikson/react-community-tools-practices-cheatsheet/discussions/1#discussioncomment-414586 )

But the initial entry is well written and this absolutely is a common problem (and one that I've pointed out quite a bit), so let's see what else makes sense to add here.