You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shenyu.apache.org by "VampireAchao (via GitHub)" <gi...@apache.org> on 2023/10/15 09:49:10 UTC

[PR] [Optimization] Optimizing CountDown Component Deprecated React Lifecycle [shenyu-dashboard]

VampireAchao opened a new pull request, #358:
URL: https://github.com/apache/shenyu-dashboard/pull/358

   issue:https://github.com/apache/shenyu-dashboard/issues/341
   
   1. Moved `initTime` - Now it's a standalone function, not in the class
      
   2. Ditched `componentWillReceiveProps` - Swapped with `getDerivedStateFromProps`
      
   3. Safe State Updates - Added a tiny `setTimeout` in `componentDidUpdate` to manage state changes safely
   
   4. Timer Management - Ensured all timers get cleared when the component says goodbye
   
   5. Clean & Clear - Aimed for code that’s easy to read and understand
   
   All cleaned up and following [React's guidelines](https://fb.me/react-unsafe-component-lifecycles) 🚀👍👀


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [Optimization] Optimizing CountDown Component Deprecated React Lifecycle [shenyu-dashboard]

Posted by "dengliming (via GitHub)" <gi...@apache.org>.
dengliming merged PR #358:
URL: https://github.com/apache/shenyu-dashboard/pull/358


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: notifications-unsubscribe@shenyu.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org