Switching to ApmRoute changes the behavior of the application

I've created an example to demonstrate the issue:

If you use the simple Route, the number will increase when switching between paths, see this video. But if you replace Route to ApmRoute, the number will always be 1. The ApmRoute is already imported so it's easy to replace to it in the example.

The cause of the problem seems to be that hooks lose their states when the route is changed, and useState will reset the counter to its default value.

This topic was automatically closed 20 days after the last reply. New replies are no longer allowed.