Menu

The home screen of our app stores nothing about itself, and two of its panels can delete themselves
📰

The home screen of our app stores nothing about itself, and two of its panels can delete themselves

DEV Community: react·Daniel Pertu·16 days ago
#etVEe9nv
#devtoreact#devto#dev#campaigns#campaign
Reading 0:00
15s threshold

The first screen behind the login in Nakodo is a list of campaigns with a few panels around it: what is waiting on you, how much of your plan you have used, and a getting-started checklist. It is 255 lines of server component, and the thing I like about it is that none of those panels has any state of its own. There is no onboarding_steps table, no dismissed_checklist column, no last_seen_tips JSON. Every tick, every bar and every empty state is computed from rows that exist for another reason.

That is a decision with costs, and the costs are more interesting than the benefits.

The checklist has no table

const steps : Step [] = [ { label : " Start a campaign " , done : true , href : inSetup ( latest ) ? `/campaigns/new/ ${ latest . id } ` : base , hint : "" }, { label : " Review and launch " , done : launched , href : inSetup ( latest ) ? `/campaigns/new/ ${ latest . id } ` : ` ${ base } /brief` , hint : `Check the proposal and anything Nakodo guessed, then launch.…

Continue reading — create a free account

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