Skip to content

bug: [react] ionViewDidEnter event fires only for one component in the view #19792

@riffbyte

Description

@riffbyte

Bug Report

Ionic version:

[x] 4.11.0

Current behavior:
If I have several components wrapped in withIonLifeCycle HOC on one page, ionViewDidEnter event gets fired only on the first component, but not others.

Expected behavior:
If I undertstand the purpose of this event, all components in the view should fire ionViewDidEnter events.

Steps to reproduce:
Clone the test repo:
https://github.com/SatoAV/ionic-test

Run npm i, then npm run start.
Open Test Page from the menu. If you open the console, you'll see that ionViewDidEnter event fired only for the component D, and not for other three components.

Similar behavior can be seen, if you wrap TestPage in withIonLifeCycle - only the page will fire the event, and not the components inside it.

Related code:

Other information:

Ionic info:

Ionic:

   Ionic CLI       : 5.4.2
   Ionic Framework : @ionic/react 4.11.0

Utility:

   cordova-res : not installed
   native-run  : not installed

System:

   NodeJS : v10.15.0 (C:\Program Files\nodejs\node.exe)
   npm    : 6.4.1
   OS     : Windows 10

Metadata

Metadata

Assignees

Labels

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