Always use configuration constants instead of hardcoding values directly in the code. This improves maintainability and reduces errors when values need to change across different environments or contexts.
Key practices:
Example:
// โ Bad
const StorageSettings = () => {
return (
<div>
Maximum size in bytes of a file that can be uploaded is 500 GB
</div>
);
}
// โ
Good
const StorageSettings = () => {
return (
<div>
Maximum size in bytes of a file that can be uploaded is {
formatBytes(STORAGE_FILE_SIZE_LIMIT_MAX_BYTES_UNCAPPED)
}
</div>
);
}
Enter the URL of a public GitHub repository