Skip to content

[Bug] NP apps are always unmounted when back button is pressed #53835

@Dosant

Description

@Dosant

Summary

Kibana version: 8.0.0

While digging into new state management utils #53582 I bumped into following issue in an example np app I created. The app uses react-router and has internal routing setup. I noticed that when trying to use a back button, the app always gets completely unmounted and then mounted again. I suspect, that the bug is somewhere inside platform code, where routing between apps is setup.

This causes unexpected component unmounts and internal component state will be lost.

Current behaviour: Pressing back button inside np apps always unmounts the whole app and mounts it again.
Expected behaviour: If after history navigation user stays within the same app, platform shouldn't unmount it and mount again, but should leave control to the application itself.

Also noticed another strange side effect:
If internal app uses hash history, then any change to hash causes the app to unmount and mount again

I reverted my branch #53582 to last Friday and it isn't reproduce. It seems that this behaviour could be caused by:
#52161

Reproduction

Video: https://drive.google.com/open?id=1ZSVKIjWkwCkwLVhOMeAZSxqUv1C_8l2_
To run the same and to see code it's: #53582

Metadata

Metadata

Assignees

Labels

Feature:New PlatformFeature:StateManagementTeam:CorePlatform Core services: plugins, logging, config, saved objects, http, ES client, i18n, etc t//bugFixes for quality problems that affect the customer experience

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions