code image

this is my first question on stackoverflow please help me out. Thanks. I am trying to simply print out the state property in a div element:
super();
this.state = {
city: "New York"
};
and then i try to print it out in a div element like this:
{this.state.city}
but it gives me the error Cannot read properties of null (reading 'city') even though its not null