Using Class syntax for React components

I have just started learning React. We are using Class Syntax for React components which old and replaced by Function Syntax. Will we be using Function Syntax in this course too? I wrote this code for my practice and Visual Studio Code shows super(props) syntax deprecated.

import React from "react";
import ReactDOM from "react-dom";
import { Child } from "./child";

class Parent extends React.Component {
    super(props); //deprecated
    this.handleClick = this.handleClick.bind(this);
  render() {
    return <Child name="faisal" />;
ReactDOM.render(<Parent />, document.getElementById("root"));

1 Like

There is now a lesson in Codecademy on functions and hooks as well. It is pretty new though. Function syntax and hooks have not replaced class syntax but is more of a new option to solve some issues.

React Website - Hooks