-
Notifications
You must be signed in to change notification settings - Fork 14
Core v4 Style Guide
crowbardispensingcore edited this page Jan 19, 2022
·
9 revisions
{
"data": {
"firstName": "Jane",
"lastName": "Doe",
"email": "example@email.com"
}
}
{
"error": {
"message": "Use 8 characters or more for your password"
}
}
try {
const res = await axios.post(...);
const { firstName, lastName, email } = res.data.data;
} catch (err) {
const status = err.response.status;
const { message } = err.response.data.error;
}
-
Use functional component instead of class component
-
Use state hooks
-
Break down components as much as possible
- Use the PR template
backend/main-endpoints/routes
officer-manager.js
ProfileHeader.jsx
ProfileHeader.css
ProfileHeader.scss
helper-function.js
header-image.jpg
-
camelCase
-
append
DB
to the end of the name -
singular
myNewDB
-
lowercase
-
no separators
-
plural
doorcodes
inventoryitems
accessLevel
firstName