Check a parsed JSON response before rendering demo items
Validate the structure of parsed JSON before your hackathon demo tries to render its items. A response can contain valid JSON and still have the wrong shape for your screen. A resource list might expect an object with an items array, while the endpoint returns null, an error object, or a string. Parsing alone does not prove that each item has the fields your component needs. State the small…
We haven't written up this one. Dev.to has the full story — the link below goes straight to it.