React declaration component

when you learn redux, you see that the document declares components like this, don"t you want to inherit Component


          Add Todo
        </button>
      </form>
    </div>
  )
}

export default connect()(AddTodo)

then what does his
export default connect () (AddTodo)
mean

Mar.01,2021

1. This is the functional component, there is no life cycle of pure components, inheriting components components have life cycle and internal state
2.components and containers are react components, but here components generally refers to pure components, that is, there is no internal state. The data displayed on the page comes from the parent component, that is, the containers component. Containers handles complex logic and data processing and passes the data to the child components through props. A simple example. A containers that shows the components of todolist is responsible for getting todolist through ajax. Pass it to the pure presentation components component

Menu