How to use the logout function of react-navigation

1. Describe the scenario where three routes are now used, the first stack route, the second tabBottm route, and the third switch route.
for example, login, registration, etc., create a loginStack.
home page, individuals, etc., create homeStack, personalStack.
, and then use tab to combine individuals and home pages.
finally, switch is used in the app to combine the final tab with the login loginstack.

such route patterns are used now, but here comes the problem. When I click exit to log in on a page in personalStack, I empty the data in asyncstroage and jump to the home page. When you click on the individual in tab, you find that the page is still on the page where you logged in. And the data still exist.

The main reason for the

problem is that stack routing is used to save the previous page without resetting the page.

2. So, how should I clear the routing stack of this stack after exiting

Jan.18,2022
Is the

problem solved? Ask for sharing

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b2baad-2affc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b2baad-2affc.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?