Is Creating Multiple Globals an Anti-Pattern? #2916
Closed
Bradleykingz
started this conversation in
General
Replies: 2 comments 2 replies
-
Since this is a "special case", I decided to use Mongoose directly and create a new global for every tenant that's created. |
Beta Was this translation helpful? Give feedback.
2 replies
-
Would be curious if there's an official way to do this, now that multi-tenancy is being promoted more within payload. |
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
-
I'm in the process of setting up a multi-tenancy enabled application. Every user should have their own "space" such that no documents ever overlap. There's only one problem - globals are meant to be for "one-off" components, such that no two instances of the same component should ever exist. Keep in mind, however, that every user should have their own navbar, and their own footer, "breaking" the concept of what a global is.
Are there perhaps ways I can work around this? For instance, creating globals on a per-user basis using hooks? And, if so, are there any ways things might break which aren't immediately obvious?
Beta Was this translation helpful? Give feedback.
All reactions