Typing for Context API where Context defaultValue is `null` · Issue #97 · typescript-cheatsheets/react · GitHub
More Web Proxy on the site http://driver.im/
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
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions!
Uh oh!
There was an error while loading. Please reload this page.
Hi there
There are times where we want the defaultValue for React's Context API to be
null
.I've found this solution.
TLDR:
Now we can pass
null
in as a default value as ourReact.createContext
argument.The text was updated successfully, but these errors were encountered: