Replies: 1 comment
-
I think the config object is usually the right place. If it's going to be the same for nearly everyone, I would put it in the impl and allow override. We prefer good defaults in the area of concern over config for the sake of config. Example: const DEFAULT_CLIENT_ID = '8340839023';
export function doMerchStuff() {
const clientid = getConfig().clientId || DEFAULT_CLIENT_ID;
} This means that most consumers don't need to manually put in the same string over and over again. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hey! we'd need to add site wise configuration for commerce (namely checkout type & clientid), is overridable config object the right place, or would there be some sort of pluggable configuration depending on commerce (or whatever feature) usage?
Beta Was this translation helpful? Give feedback.
All reactions