Home > Software design >  how to create screen and navigations for two different users in react native
how to create screen and navigations for two different users in react native

Time:12-03

I have two types of users in my app. one is health partners and other one is customers. so Lets Assume I have 4 screen.

  1. Home Screen
  2. Menu Screen
  3. Notification Screen
  4. Account Screen

so I have different UIs in all 4 screens means for health partner Home screen look different and for customers it Should look different.

so what is the best way to do that. Should I create separate Screen And separate Stacks for two users. means then there is two stacks and 8 screens. or what you think please help

CodePudding user response:

You can Save user kind in login as AysicStorege and check that in all of your screen and then initialize UI changes for that pages

CodePudding user response:

Here is one approach, When you are onboarding a user be it while login or otherwise, pass a parameter in navigation and then apply the appropriate style based on the type of user.

Here is the working example: enter image description here

  • Related