React: use axios to post state to MongoDB
问题 I am trying to post the states as data to MongoDB through Express and Node with Axios. class App extends React.Component { constructor(props){ super(props) this.state={ items: [{ desc:"Manage", price: 5000, purchased: false, }, { desc:"Deliver", price: 2000, purchased: false, }, { desc:"Market", price: 4000, purchased: false, } ], data:null, DisabledButton: true } } getAddedItems(){ return this.state.items.filter(item => item.purchased) } componentDidMount() { this.callApi() .then(res => this