API design

This is part of the Semicolon&Sons Code Diary - consisting of lessons learned on the job. You're in the web-development category.

Last Updated: 2024-11-21

send DB ids to front end

It's tempting to remove them as superfluous data, especially in things no-one really needs to identify, like models for opening hours, but this is a false saving.

They are useful for debugging. And In React, they give unique component keys for individual components.