
[英]The react-use-cart needs the string ( id ) but my api data only generates the object ( _id ), how can I change it and use it normally?
我正在创建一个购物车,我需要添加该项目,function 具有项目的 id 作为要求,但我的项目只生成 _id 而不仅仅是 id。 对于知识渊博的人来说,这个问题很简单,在此先感谢协作者 https://www.npmjs.com/package/react-use-cart Index.js ...