ama
ama copied to clipboard
Theming a multi-tenant application
Hi Kent,
I'm struggling for a while with this problem .
In my company, we are starting a new multi-tenant react SPA application where every tenant corresponds to a different client based on styled-components and material-ui.
Clients based on contracts could have customization , from a logo or colors to (rarely) a custom styled components, like for example a custom header with a different element position, a background image instead of a color and so on.
In your opinion, which is the best way to achieve it ?
I have been thinking these solutions, but I really don't know if are correct or not:
- A build for each client with a custom theme component with all the different style property
- A build for each client with a custom component library (which could extend ours for updates) injected via webpack during the build process
- Fetching theme via apis and switch for 'client's custom components'
- Fetching theme via apis (themes which contains the props for creating the custom components)
- Themes and getting custom styles from api to inject in styled components
Thank you! PS: your egghead and testingjavascript courses are great!