Menu

One caveat sentence, three wordings of it in our code, and the only test asserts the five words all three share
📰

One caveat sentence, three wordings of it in our code, and the only test asserts the five words all three share

DEV Community: reactnative·Daniel Pertu·1 day ago
#jwTx2wOn
#devtoreactnative#devto#dev#sentence#label
Reading 0:00
15s threshold

Munchable reads a food label and tells you whether a product suits a digestive condition you have. Under every answer it gives sits one sentence:

Based on the product's listed ingredients. Always read the physical label.

Eleven words. It is not legal boilerplate, it is the honest scope of the answer above it: the product knows what a label says, and a label is not the same thing as a food. Everything downstream of that, what the app is allowed to claim, what it must never claim, and where each caveat is written down, turns out to be an architecture problem rather than a copywriting one.

This post is the map of those sentences, the two that drifted, and the one surface that deliberately has none.

The caveat lives with the thing it caveats

The canonical version is a constant in the rules engine package, next to the condition labels:

/** Rendered on every scan result (PLAN.md §6, §7). */ export const DISCLAIMER = ' Based on the product’s listed ingredients. Always read the physical label.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.