React tip: in order to prohibit usage of context without a provider, pass an object with getters throwing errors as the default value. In TypeScript, set their return type to `never`. https://t.co/pYZc2V5oXd https://t.co/Dnn6I1kx6K 0 atbildes
Kirill Korolyov (2020-10-14 15:47:14) |
React tip: in order to prohibit usage of context without a provider, pass an object with getters throwing errors as the default value. In TypeScript, set their return type to `never`. https://t.co/pYZc2V5oXd https://t.co/Dnn6I1kx6K |