The render() method is the only required method in a class component. i.e, All methods other than render method are optional for a class component.
render()