question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

bug: Lifecycle events never be fired on React.FC

See original GitHub issue

Bug Report

Ionic version: [x] 4.x

Current behavior: I’m trying to receive lifecycle events following your documentation: https://ionicframework.com/docs/react/lifecycle

https://github.com/pjc0247/bugreport/blob/master/src/pages/Home.tsx#L6

Expected behavior: console log will be printed.

Steps to reproduce: https://pjc0247.github.io/bugreport/build/index.html

Related code: https://github.com/pjc0247/bugreport/blob/master/src/pages/Home.tsx#L6

Other information:

Ionic info:

Ionic:

   Ionic CLI       : 5.4.12 (C:\Users\pjc02\AppData\Roaming\npm\node_modules\ionic)
   Ionic Framework : @ionic/react 4.11.6

Utility:

   cordova-res : 0.6.0
   native-run  : 0.2.8

System:

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

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
elylucascommented, Dec 12, 2019

fixed and released in 4.11.7, thanks for reporting!

1reaction
elylucascommented, Dec 12, 2019

Thanks,

I’ve found the issue and am working on a fix. Hopefully will be out later today.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Hooks FAQ - React
How do lifecycle methods correspond to Hooks? ... rewriting your existing classes to Hooks unless you planned to rewrite them anyway (e.g. to...
Read more >
Understanding common frustrations with React Hooks
Learn about some of the drawbacks to using React Hooks. ... There are several well-documented problems with class-based lifecycle events.
Read more >
How to use componentWillMount() in React Hooks?
The first one is that there isn't a mounting lifecycle in functional components, both hooks will run after the component has rendered, so...
Read more >
A Guide to Ionic React App Component Lifecycles
The React Lifecycle guide discusses how to use the Ionic Lifecycle events ... ionViewDidEnter, Fired when the component routing to has finished animating....
Read more >
How to identify and resolve wasted renders in React
How do the components live through the component lifecycles in the applications ... That means props and state it receives; say that is...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found