Any idea to manage the constants properly? #254
Replies: 1 comment
-
@AndrewLawrence80: your proposed structure under internal/constant seems quite reasonable (personally I'd rename it to "constants" plural, but that's preference). I don't know fully what scale you're talking about though, however, here are some general tips I can think of that could help:
Maybe this helps? |
Beta Was this translation helpful? Give feedback.
-
As programs grow bigger, it is really annoying to properly manage the constants.
I have searched this article https://semaphoreci.com/blog/constants-layer-javascript. It provides a good manner to manage the constants in JS.
How do you organize the constants?
Currently my idea is to create a separated
constant
package under theinternal
package and organize the constants like below:Beta Was this translation helpful? Give feedback.
All reactions