Menu

302 lines of shared components carry 1,035 uses across 392 pages, and no two page families reach for the same half
📰

302 lines of shared components carry 1,035 uses across 392 pages, and no two page families reach for the same half

DEV Community: react·Daniel Pertu·about 14 hours ago
#wLkiAmOI
#devtoreact#devto#dev#pages#lines
Reading 0:00
15s threshold

CogniPrep has three families of long-form content pages, and they are all hand-written React:

family page files lines inline <Link>

/employers/* 212 46,778 662

/blogs/* 117 26,112 372

/cheating/* 66 10,540 61

395 83,430 1,095

83,430 lines of JSX whose job is prose. Serving all of it is one file, components/shared/content-blocks.tsx , which is 302 lines and exports ten components . They are used 1,035 times across 392 of those 395 pages. The three that use none are the three index pages, which is correct.

A 1,035-to-302 ratio is the easy part of the story. The interesting part is who uses what.

The same vocabulary, three dialects

block pages uses employers blogs cheating

Callout 247 283 117 91 39

SpecList 174 197 61 73 40

StatStrip 188 188 150 25 13

DoDont 102 102 22 39 41

CardGrid 70 76 6 41 23

NumberedSteps 69 69 36 24 9

KeyTakeaways 43 43 7 32 4

SplitCompare 38 39 4 20 14

SectionIndex 24 24 4 12 8

TimeBudget 14 14 2 10 2

Nobody specified any of that.…

Continue reading — create a free account

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