You may want to read up on view States.
Thanks for your quick answer. I read about states. Is this appropiate for my requirements? I mean, the examples I saw are about changing the appareance of small sections (like the login/register example). What I want to do is change the whole page and this page will include a good bunch of code. That's why I discarded it from the beggining.
But then, I might be wrong...
1 person found this helpful
I would use the ViewStack component. States vs Viewstacks can sometimes be a preference thing. But for me I see it like this , if the bulk of the view is unchanging , use a state. An example is a login view , where a failed login leads to view increasing in height to display the error text. On the other hand , when I feel that the change in view is equivalent to a whole new page , like what the user goes to after successfully logging in , I use view stacks. An example of this would be something like this
<Login View /> // Purpose of this view is for logging in. It's events and components are generally confined to it.
<Clothes View /> // View concerns clothes
<Purchase Page /> // View holds the purchase data , allowing the user to buy items.
If this post was helpful please mark it as such.
Thanks for your reply,
I think I will try ViewStack with custom components which seems to be a good solution. However, I wonder if somebody can tell me in what case modules would be more suitable? Does it depend only on the size/complexity of the application or is there any other factor to take into account?