React Component Class Syntax - Do I need to use

Given the following code:

import React from 'react';
import ReactDOM from 'react-dom';

class Quote extends React.Component {
  
  render() {
    return (
      <blockquote>
        <p>
          What is important now is to recover our senses.
        </p>
        <cite>
          <a 
            target="_blank"
            href="https://en.wikipedia.org/wiki/Susan_Sontag">
            Susan Sontag
          </a>
        </cite>
      </blockquote>
    );
  }
}

Would the following still work? If I were to use the following:

import React from 'react';
import ReactDOM from 'react-dom';

class Quote extends React.Component {
  
  render: function() {
    return (
      <blockquote>
        <p>
          What is important now is to recover our senses.
        </p>
        <cite>
          <a 
            target="_blank"
            href="https://en.wikipedia.org/wiki/Susan_Sontag">
            Susan Sontag
          </a>
        </cite>
      </blockquote>
    );
  }
}