'state' is not defined no-undef

Hey! I keep getting the error and I am not quite sure what’s going on or how to fix it (I’m very new to React and JS).


src\components\counter.jsx Line 4:3: ‘state’ is not defined no-undef Search for the keywords to learn more about each error.


import React, { Component } from "react";

class Counter extends Component {

  state = {

    count: 0,


  render() {

    return (








export default Counter;

the code seems okay for me.

are u still having this problem ?

I need more detail info

1 Like