Some un-common Errors I am facing during work -
govindbisen
Posted on August 16, 2022
- Property 'Razorpay' does not exist on type 'Window & typeof globalThis'.
I came across this error and it was not so easy for me to solve this, that's why creating this small article.
I am working in ReactTs
you will probably use
var rzp1 = new Razorpay(options); or
var rzp1 = new window.Razorpay(options);
above your react class or function put
declare global {
interface Window {
// ⚠️ notice that "Window" is capitalized here
Razorpay: any;
}
}
2 . Getting proxy while console.log(state)
in cart Slice (Redux)
solved by
import { current } from '@reduxjs/toolkit';
...
console.log(current(state));
💖 💪 🙅 🚩
govindbisen
Posted on August 16, 2022
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.