Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You have a card with a name, when you click it a detail popup opens and the name is in there. There's also a delete button saying "Delete <name>", which pops up a confirm dialog and the name is in there, too. When you update the name you have to update all those places.

The alternative is there's a canonical name variable, and it's rendered in all those places. To update the name, you just update that variable and "re-render", and those places naturally pick up the new value.



yeah okay, I agree.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: