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
I would have expected the hook usePreferences to save a value inside the RaStore.preferences path.
If usePreferences is not to be used outside of a Configurable (which in my opinion it should be based on the name), at least a a warning should be printed to the console if the PreferenceKeyContext is not provided or empty.
What happened instead:
The key value forwarded to the setItem function in the store is empty, resulting in a value being set for RaStore. no matter what the actual key is.
Steps to reproduce:
Use the following code snipped outside of a Configurable component
//Does not work but should be identical to the hook belowconst[showExpertView,setShowExpertView]=usePreferences("expertView",false,);//Worksconst[showExpertView,setShowExpertView]=useStore("preferences.expertView",false,);
The text was updated successfully, but these errors were encountered:
What you were expecting:
I would have expected the hook
usePreferences
to save a value inside the RaStore.preferences path.If
usePreferences
is not to be used outside of a Configurable (which in my opinion it should be based on the name), at least a a warning should be printed to the console if thePreferenceKeyContext
is not provided or empty.What happened instead:
The key value forwarded to the
setItem
function in the store is empty, resulting in a value being set forRaStore.
no matter what the actual key is.Steps to reproduce:
The text was updated successfully, but these errors were encountered: