You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Just giving a copy and paste in the code in the cods using the hook useMMKVStorage()
1° - const MMKV: MMKVStorage.API = new MMKVLoader().initialize()
TS say: 'MMKVStorage' refers to a value, but is being used as a type here. Did you mean 'typeof MMKVStorage'
but using typeof MMKVStorage.API this returns error
2° - const [value, setValue] = useStorage(' ') - When i press CTRL+SPACE, to see the options, this returns nothing
Hacks
When i just use ----> key: 'clientList' | 'totalDay' | 'totalMonth' ------ Without the LiteralUnion the TS returns my 3 options
Screenshots
THIS WORKS
FIX
Doing this, will work, but keeping the (U =string), if i put any string inside my hook this wont send error because U accepts string too.
Platform Information:
OS: [e.g. iOS/Android]
React Native Version [e.g. 0.64]
Library Version [e.g. 0.8]
The text was updated successfully, but these errors were encountered:
Describe the bug
Just giving a copy and paste in the code in the cods using the hook useMMKVStorage()
1° - const MMKV: MMKVStorage.API = new MMKVLoader().initialize()
TS say: 'MMKVStorage' refers to a value, but is being used as a type here. Did you mean 'typeof MMKVStorage'
but using typeof MMKVStorage.API this returns error
2° - const [value, setValue] = useStorage(' ') - When i press CTRL+SPACE, to see the options, this returns nothing
Hacks
When i just use ----> key: 'clientList' | 'totalDay' | 'totalMonth' ------ Without the LiteralUnion the TS returns my 3 options
Screenshots
THIS WORKS
FIX
Doing this, will work, but keeping the (U =string), if i put any string inside my hook this wont send error because U accepts string too.
Platform Information:
The text was updated successfully, but these errors were encountered: