Skip to main content
Version: 3.x

Taro.clearStorageSync()

The synchronous version of Taro.clearStorage.

Reference

Type

() => void

Parameters

Sample Code

Taro.clearStorage()
try {
Taro.clearStorageSync()
} catch(e) {
// Do something when catch error
}

API Support

APIWeChat Mini-ProgramH5React Native
Taro.clearStorageSync✔️✔️