Access a Component's state

In this exercise, , it was stated that “Just like this.props, you can use this.state from any property defined inside of a component class’s body.” is it possible for the property to be defined outside the component class’s body and still work? for example

import React from 'react'; import ReactDOM from 'react-dom'; class Greeting extends React.Component { render() { return <h1>Hi there, {}!</h1>; } } ReactDOM.render( <Greeting name='Groberta' />, document.getElementById('app') );

Thank you!