How to best emulate global state in a prototype?


I am creating a prototype for an app where the user can be either logged in or not. Across the screens 80 % of the design and how the navigation works is totally the same if they are logged in or not.

But of course some things differ.

I know how to handle state in a single component.

And from what I can read there is no official way to save something like a global state of logged-in and make the individual components act according to this.

One way of dealing with this would be to have a lot of duplicated screens with duplicated navigation and just bouncing the user back and forth between the two versions if they are logged in or not.

This is doable. But kinda messy and error-prone.

I really wanna see how other have done something similar or just hear what approaches you would recommend?