ReactJS lifecycle method inside a functional Component

 1import React, { Component } from 'react';
 2import lifecycle from 'react-pure-lifecycle';
 4const methods = {
 5  componentDidMount(props) {
 6    console.log('I mounted! Here are my props: ', props);
 7  }
10const Channels = props => (
14export default lifecycle(methods)(Channels);

Source: StackOverFlow.

Related Posts

Airflow, MLflow or Kubeflow for MLOps?

Machine learning is now focusing more on the data (data-centric AI), and MLOps is obviously the way to bring ML projects into production.

Read more

With Daisykit – Everyone can build AI projects!

Imagine you are a software engineer or a DIY hobbyist with great ideas to build AI-powered projects. However, it will be such difficulty when you know very little or nothing about AI.

Read more

Install ROS 2 on Raspberry Pi 4 (SD card image available)

ROS2 is an excellent framework for robotics applications. You can go further and embed a completed ROS 2 application stack in a small robot base with a Raspberry Pi computer.

Read more