i am asking myself how to approach this task with a good design pattern. My Scenario is like the customer can choose how his application behave in an adminpanel. So actually he his filling a form to make a configuration for his App. This configuration, is stored in a Database or where you like.
After creating this Config, the App should now be able to response to it. For Example the config says that in a specific screen an input field should be available so the app will display it. In react or react-native it is quite easy to hide elements with if / else statements. But is there an other way to solve this problem? A Design Pattern that can handle it? Like a Factory or something similar. It feels so wrong to make these big if else cases..
I would be happy to hear from you guys! It is my first post here.
Aucun commentaire:
Enregistrer un commentaire