Open smitroshin opened 10 months ago
What is the current behavior?
TypeScript shows me the correct type of useSessionStorage state. But in reality type is "string".
console.log("🚀 ~ tabId:", tabId, typeof tabId); # Console output: 🚀 ~ tabId: 1698999742580 string
Demo on CodeSandbox Test with extension on and off in incognito mode.
Note Originally, the issue was written for react-use library. But after, I found out that json-formatter makes that happened.
What is the expected behavior?
Type of useSessionStorage state should have type inherited from initialValue.
A little about versions:
react-scripts
react-use
What is the current behavior?
TypeScript shows me the correct type of useSessionStorage state. But in reality type is "string".
Demo on CodeSandbox Test with extension on and off in incognito mode.
Note Originally, the issue was written for react-use library. But after, I found out that json-formatter makes that happened.
What is the expected behavior?
Type of useSessionStorage state should have type inherited from initialValue.
A little about versions:
react-scripts
: 5.0.0react-use
: ^17.4.0