arco-design / arco-design-pro

An out-of-the-box solution to quickly build enterprise-level applications based on Arco Design.
https://pro.arco.design
MIT License
485 stars 95 forks source link

In the useStorage removeStorage method, it is the variable key, not the string key, that should be taken to clear the local cache #42

Closed declanchiu closed 2 years ago

declanchiu commented 2 years ago

基本信息

预期结果

After you click the clear method, the cache for the key in localStorage should disappear.

复现步骤

Use useStorage hooks on the page, use the array subscript 1 set cache method in useEffect to set a string. Then write a button to trigger the cleanup cache method provided by array subscript 2, but it doesn't work, and the corresponding key cache for localStorage still exists.