bug: Lifecycle events never be fired on React.FC
See original GitHub issueBug 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:
- Created 4 years ago
- Reactions:1
- Comments:5 (4 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
fixed and released in 4.11.7, thanks for reporting!
Thanks,
I’ve found the issue and am working on a fix. Hopefully will be out later today.